Commit 211a0a7e authored by Alessio Netti's avatar Alessio Netti
Browse files

Analytics: minor fixes

parent b4830c2b
......@@ -85,7 +85,7 @@ bool sensorQueryCallback(const string &name, const uint64_t startTs, const uint6
bool found = false;
++_queryEngine.access;
shared_ptr<map<string, SBasePtr>> sensorMap = _queryEngine.getSensorMap();
if (sensorMap != nullptr && sensorMap->count(name) > 0) {
SBasePtr sensor = sensorMap->at(name);
found = sensor->isInit() ? sensor->getCache()->getView(startTs, endTs, buffer, rel) : false;
......@@ -99,8 +99,9 @@ bool sensorGroupQueryCallback(const std::vector<string> &names, const uint64_t s
if (_queryEngine.updating.load())
return false;
bool outcome = false;
for(const auto& name : names)
outcome = outcome || sensorQueryCallback(name, startTs, endTs, buffer, rel);
for(const auto& name : names) {
outcome = sensorQueryCallback(name, startTs, endTs, buffer, rel) || outcome;
}
return outcome;
}
......
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