X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter.comm%2FApplicationMessageOamModule.cpp;h=5511db95836c5ab84e8c714c2e1e88e7e6188fb1;hb=64d7c531cdf5f4bca4fa2d8c9736de98247dfe13;hp=91fff6c7431fd521efe0cdb2ba33a2267d444cd5;hpb=5406b19bdbfe101b264f8c4d878392e2916b8f9d;p=anna.git diff --git a/source/diameter.comm/ApplicationMessageOamModule.cpp b/source/diameter.comm/ApplicationMessageOamModule.cpp index 91fff6c..5511db9 100644 --- a/source/diameter.comm/ApplicationMessageOamModule.cpp +++ b/source/diameter.comm/ApplicationMessageOamModule.cpp @@ -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;