Commit f578c9a8 authored by Michael Ott's avatar Michael Ott
Browse files

Use getPublicSensorNames() to retrieve lit of sensors for wildcard matching...

Use getPublicSensorNames() to retrieve lit of sensors for wildcard matching instead of getPublicSensorsVerbose()
parent d6878fa1
......@@ -1134,7 +1134,8 @@ SCError SensorConfigImpl::getPublicSensorsByWildcard(std::list<PublicSensor>& se
}
return err;
} else {
if ((err = getPublicSensorsVerbose(sensors)) == SC_OK) {
std::list<std::string> sensorNames;
if ((err = getPublicSensorNames(sensorNames)) == SC_OK) {
std::string w("^");
while (*wildcard != 0) {
switch (*wildcard) {
......@@ -1160,12 +1161,11 @@ SCError SensorConfigImpl::getPublicSensorsByWildcard(std::list<PublicSensor>& se
}
boost::regex r(w, boost::regex::basic);
auto it = sensors.begin();
while(it != sensors.end()) {
if (!boost::regex_match(it->name, r)) {
it = sensors.erase(it);
} else {
it++;
for (auto s: sensorNames) {
if (boost::regex_match(s, r)) {
PublicSensor ps;
getPublicSensorByName(ps, s.c_str());
sensors.push_back(ps);
}
}
......
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