X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter.comm%2FClientSession.cpp;h=34d29a5a180a0f13285b0505c1cb509c099a5ab2;hb=7512c4429857d8b048c89ac94b9b631a5e912280;hp=73d097a40f7c7d67ec28d3c7435c4324175af407;hpb=4e12ac57e93c052f716a6305ad8fc099c45899d1;p=anna.git diff --git a/source/diameter.comm/ClientSession.cpp b/source/diameter.comm/ClientSession.cpp index 73d097a..34d29a5 100644 --- a/source/diameter.comm/ClientSession.cpp +++ b/source/diameter.comm/ClientSession.cpp @@ -1,4 +1,4 @@ -// ANNA - Anna is Not 'N' Anymore +// ANNA - Anna is Not Nothingness Anymore // // (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo // @@ -140,6 +140,10 @@ void ClientSession::bind() throw(anna::RuntimeException) { return; } + // Some operations could be done before sending CER, for example non-standard Origin-Host manipulation for + // Tekelec PCRF + a_engine->bindingClientSession(this); + // OAM Lo comento, porque no se contabilizan los reintentos y por lo tanto no son muy Ăștiles. // OamModule &oamModule = OamModule::instantiate(); // oamModule.count(a_server->isAvailable() ? OamModule::Counter::TCPConnectOK:OamModule::Counter::TCPConnectNOK); @@ -578,7 +582,10 @@ throw(anna::RuntimeException) { } if(resultCode != helpers::base::AVPVALUES__Result_Code::DIAMETER_SUCCESS) { - LOGWARNING(anna::Logger::warning("Received CEA with non-success Result-Code. Unbinding connection.", ANNA_FILE_LOCATION)); + LOGWARNING( + std::string msg = anna::functions::asString("Received CEA with non-success Result-Code (%d). Unbinding connection.", resultCode); + anna::Logger::warning(msg, ANNA_FILE_LOCATION); + ); doUnbind = true; } else { setState(State::Bound); @@ -594,7 +601,10 @@ throw(anna::RuntimeException) { setWatchdogState(WatchdogState::WaitingTimerExpiration); if(resultCode != helpers::base::AVPVALUES__Result_Code::DIAMETER_SUCCESS) - LOGWARNING(anna::Logger::warning("Received DWA with non-success Result-Code... but ASSUME keep-alive is reached", ANNA_FILE_LOCATION)); + LOGWARNING( + std::string msg = anna::functions::asString("Received DWA with non-success Result-Code (%d)... but ASSUME keep-alive is reached", resultCode); + anna::Logger::warning(msg, ANNA_FILE_LOCATION); + ); if(a_state == State::Failover) { setState(State::Bound); @@ -615,7 +625,10 @@ throw(anna::RuntimeException) { if(a_state == State::WaitingDPA) { if(resultCode != helpers::base::AVPVALUES__Result_Code::DIAMETER_SUCCESS) { - LOGWARNING(anna::Logger::warning("Received DPA with non-success Result-Code. Ignoring and recovering Bound state", ANNA_FILE_LOCATION)); + LOGWARNING( + std::string msg = anna::functions::asString("Received DPA with non-success Result-Code (%d). Ignoring and recovering Bound state", resultCode); + anna::Logger::warning(msg, ANNA_FILE_LOCATION); + ); setState(State::Bound); } else { LOGWARNING(anna::Logger::warning("Received DPA With Result-Code = DIAMETER_SUCCESS. Disconnect now.", ANNA_FILE_LOCATION));