Commit 15ffd5f1 authored by Alessio Netti's avatar Alessio Netti
Browse files

CollectAgent: bugfix

- When building the SensorNavigator, trailing whitespace must be
stripped from the sensor names if they were shorter than 16 characters
parent 980f3038
......@@ -58,9 +58,12 @@ bool AnalyticsController::initialize(Configuration& settings, const string& conf
list <DCDB::PublicSensor> publicSensors;
// Fetching sensor names and topics from the Cassandra datastore
_dcdbCfg->getPublicSensorsVerbose(publicSensors);
std::string patternBuf;
for (const auto &s : publicSensors)
if (!s.is_virtual) {
topics.push_back(s.pattern);
patternBuf = s.pattern;
boost::algorithm::trim(patternBuf);
topics.push_back(patternBuf);
}
publicSensors.clear();
......
......@@ -34,6 +34,7 @@
#include <dcdb/sensorconfig.h>
#include <boost/asio.hpp>
#include <boost/thread/thread.hpp>
#include <boost/algorithm/string/trim.hpp>
#include "../analytics/OperatorManager.h"
#include "sensornavigator.h"
#include "sensorcache.h"
......
Supports Markdown
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