diff options
Diffstat (limited to 'cpp/src/Ice/MetricsAdminI.cpp')
-rw-r--r-- | cpp/src/Ice/MetricsAdminI.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp index d70ca64458b..493f0a30e40 100644 --- a/cpp/src/Ice/MetricsAdminI.cpp +++ b/cpp/src/Ice/MetricsAdminI.cpp @@ -121,16 +121,19 @@ MetricsMapI::RegExp::~RegExp() bool MetricsMapI::RegExp::match(const MetricsHelper& helper, bool reject) { - string value = helper(_attribute); - if(value == "unknown") // Unknown attributes are ignored by filtering + try { - return !reject; - } + string value = helper(_attribute); #ifndef ICE_CPP11_REGEXP - return regexec(&_preg, value.c_str(), 0, 0, 0) == 0; + return regexec(&_preg, value.c_str(), 0, 0, 0) == 0; #else - return regex_match(value, _regex); + return regex_match(value, _regex); #endif + } + catch(const std::exception&) + { + return !reject; + } } MetricsMapI::MetricsMapI(const std::string& mapPrefix, const PropertiesPtr& properties) : @@ -258,6 +261,7 @@ MetricsViewI::update(const PropertiesPtr& properties, { // This map isn't configured anymore for this view. updatedMaps.insert(p->second); + _maps.erase(mapName); continue; } } |