X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter.comm%2FClientSession.cpp;h=78aa06c50bf6873e0b208e0d2d329b46628b9dfe;hb=7ee10b64f4c116460ffef5784eb9ef87d3f2339c;hp=83c286c0311f5de3843f16de9e7b172efb501517;hpb=4c3f0a4d7e4db76996404d80c6f939548fca656f;p=anna.git diff --git a/source/diameter.comm/ClientSession.cpp b/source/diameter.comm/ClientSession.cpp index 83c286c..78aa06c 100644 --- a/source/diameter.comm/ClientSession.cpp +++ b/source/diameter.comm/ClientSession.cpp @@ -81,7 +81,7 @@ int ClientSession::getPort() const throw() { void ClientSession::setState(State::_v state) throw() { Session::setState(state); // Inform father server (availability changes): - bool changes = a_parent->refreshAvailability(); + a_parent->refreshAvailability(); } void ClientSession::bind() throw(anna::RuntimeException) { @@ -510,12 +510,13 @@ throw(anna::RuntimeException) { } } ); + // Main counters: OamModule &oamModule = OamModule::instantiate(); oamModule.count(isRequest ? OamModule::Counter::RequestReceived : OamModule::Counter::AnswerReceived); oamModule.count(isRequest ? OamModule::Counter::RequestReceivedOnClientSession : OamModule::Counter::AnswerReceivedOnClientSession); // Statistic (size) - a_parent->updateReceivedMessageSizeStatisticConcept(message.getSize()); // only on reception (application could manage sent sizes) + a_parent->updateReceivedMessageSizeStatisticConcept(message.getSize(), cid); // only on reception (application could manage sent sizes) if(isRequest) { ///////////////////////////// @@ -599,7 +600,7 @@ throw(anna::RuntimeException) { setState(State::Bound); //activateTimer(); // Ya se invoca al inicio de este metodo ::receive // Inform father server (availability changes): - bool changes = a_parent->refreshAvailability(); + a_parent->refreshAvailability(); //startClock(); } } @@ -678,14 +679,14 @@ throw(anna::RuntimeException) { anna::Millisecond current = (anna::Millisecond)anna::functions::millisecond(); anna::Millisecond request = response->getRequest()->getRequestTimestampMs(); anna::Millisecond timeToAnswerMs = current - request; - a_parent->updateProcessingTimeStatisticConcept(timeToAnswerMs); - LOGDEBUG - ( - std::string msg = "This diameter request context lasted "; - msg += anna::functions::asString(timeToAnswerMs); - msg += " milliseconds at diameter server (included network time)"; - anna::Logger::debug(msg, ANNA_FILE_LOCATION); - ); + a_parent->updateProcessingTimeStatisticConcept(timeToAnswerMs, cid); + //LOGDEBUG + //( + // std::string msg = "This diameter request context lasted "; + // msg += anna::functions::asString(timeToAnswerMs); + // msg += " milliseconds at diameter server (included network time)"; + // anna::Logger::debug(msg, ANNA_FILE_LOCATION); + //); // Progress origin for tracking purposes on asyncronous boxes with both diameter interfaces (entities and clients) Message * requestMessage = const_cast(response->getRequest()); requestMessage->setRequestServerSessionKey(response->getRequest()->getRequestServerSessionKey()); // -1 means unkown/unset @@ -730,10 +731,8 @@ throw(anna::RuntimeException) { void ClientSession::finalize() throw() { LOGMETHOD(anna::TraceMethod traceMethod(a_className, "finalize", ANNA_FILE_LOCATION)); Session::finalize(); - // Check deprecated entity: - const Entity *entity = getParent() /* server */ ->getParent() /* entity */; // Inform father server (availability changes): - bool changes = a_parent->refreshAvailability(); + a_parent->refreshAvailability(); // OAM const Server *server = getParent(); bool multipleConnections = (server->getMaxClientSessions() > 1); @@ -764,7 +763,7 @@ void ClientSession::recover() throw() { } // Inform father server (availability changes): - bool changes = a_parent->refreshAvailability(); + a_parent->refreshAvailability(); // OAM const Server *server = getParent(); bool multipleConnections = (server->getMaxClientSessions() > 1);