Commit 2612a12d authored by Michael Ott's avatar Michael Ott
Browse files

Fix SensorMap lookups for cases where loadCache() has not been called before

parent 1c9b609d
......@@ -767,8 +767,9 @@ SCError SensorConfigImpl::getPublicSensorByName(PublicSensor& sensor, const char
sensor.frequency = frequency;
/* Add to sensorPropertyCache for later use */
sensorMapByName.insert(std::make_pair(publicName, std::ref(sensor)));
sensorMapByPattern.insert(std::make_pair(sensor.pattern, std::ref(sensor)));
sensorList.push_back(sensor);
sensorMapByName.insert(std::make_pair(publicName, std::ref(sensorList.back())));
sensorMapByPattern.insert(std::make_pair(sensor.pattern, std::ref(sensorList.back())));
}
else {
cass_result_free(result);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment