X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter.comm%2FApplicationMessageOamModule.cpp;h=8f3dfa0fb8c28915eeac295354a7fd9ff796f854;hb=refs%2Fheads%2Fmaster;hp=91fff6c7431fd521efe0cdb2ba33a2267d444cd5;hpb=5406b19bdbfe101b264f8c4d878392e2916b8f9d;p=anna.git diff --git a/source/diameter.comm/ApplicationMessageOamModule.cpp b/source/diameter.comm/ApplicationMessageOamModule.cpp index 91fff6c..8f3dfa0 100644 --- a/source/diameter.comm/ApplicationMessageOamModule.cpp +++ b/source/diameter.comm/ApplicationMessageOamModule.cpp @@ -36,7 +36,7 @@ anna_assign_enum(anna::diameter::comm::ApplicationMessageOamModule::Counter) = { NULL /* list end indicator */ }; -void anna::diameter::comm::ApplicationMessageOamModule::createStackCounterScope(int scopeId, unsigned int stackId) throw(anna::RuntimeException) { +void anna::diameter::comm::ApplicationMessageOamModule::createStackCounterScope(int scopeId, unsigned int stackId) noexcept(false) { initializeCounterScope(scopeId, anna::functions::asString("Application Message Events for stack id %lu", stackId)); @@ -47,7 +47,7 @@ void anna::diameter::comm::ApplicationMessageOamModule::createStackCounterScope( a_stackMap[stackId] = scopeId; } -void anna::diameter::comm::ApplicationMessageOamModule::count (int messageCode, int resultCode, unsigned int stackId, const int & type, const int & amount) throw(anna::RuntimeException) { +void anna::diameter::comm::ApplicationMessageOamModule::count (int messageCode, int resultCode, unsigned int stackId, const int & type, const int & amount) noexcept(false) { // Optimization: // Checkings @@ -91,7 +91,7 @@ void anna::diameter::comm::ApplicationMessageOamModule::count (int messageCode, LOGDEBUG(anna::Logger::debug(anna::functions::asString("No more holes to register new application message counters in the scope (up to %d message codes)", capacity), ANNA_FILE_LOCATION)); return; } - baseOffset = getCounterTypes() * a_eventMap.size(); // N counter types for each message code + baseOffset = getCounterTypes() * a_eventMap.size(); // N counter types for each message code / rc a_eventMap[eventId] = baseOffset; // Counter name: @@ -116,13 +116,19 @@ void anna::diameter::comm::ApplicationMessageOamModule::count (int messageCode, if (counterNamePrefix[counterNamePrefix.size() - 1] != '-') counterNamePrefix += "-"; std::string counterName; - // register only count event: - //for (int offset = 0; offset < getCounterTypes(); offset++) { - int offset = baseOffset + type; + /* + for (int offset = 0; offset < getCounterTypes(); offset++) { counterName = counterNamePrefix + getDefaultInternalCounterDescription(offset); if (resultCode != -1) counterName += anna::functions::asString("-ResultCode_%d", resultCode); registerCounter(baseOffset + offset, counterName, baseOffset + offset); - //} + } + */ + // Register only affected one: + int offset = baseOffset + type; + counterName = counterNamePrefix + getDefaultInternalCounterDescription(type); + if (resultCode != -1) counterName += anna::functions::asString("-ResultCode_%d", resultCode); + registerCounter(offset, counterName, offset); + } else { baseOffset = eventMap_it->second;