From: Eduardo Ramos Testillano Date: Sun, 13 Jul 2014 21:41:45 +0000 (+0200) Subject: Portability X-Git-Tag: REFACTORING_TESTING_LIBRARY~253 X-Git-Url: https://git.teslayout.com/public/public/public/?a=commitdiff_plain;h=0a932e18aa292d15b571b8ccccd9d03200d88e63;p=anna.git Portability --- diff --git a/example/time/conversor/main.cpp b/example/time/conversor/main.cpp index d21704c..e02f4b6 100644 --- a/example/time/conversor/main.cpp +++ b/example/time/conversor/main.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/source/diameter.comm/ClientSession.cpp b/source/diameter.comm/ClientSession.cpp index 71be8a3..48ab69b 100644 --- a/source/diameter.comm/ClientSession.cpp +++ b/source/diameter.comm/ClientSession.cpp @@ -582,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); @@ -598,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); @@ -619,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));