X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FMyLocalServer.cpp;h=42b8b1e233c0e761fc46be7674ae43dbdef0fcb3;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hp=383db732fb1cac93b75b8f1b6849138e7e78795c;hpb=7ee10b64f4c116460ffef5784eb9ef87d3f2339c;p=anna.git diff --git a/example/diameter/launcher/MyLocalServer.cpp b/example/diameter/launcher/MyLocalServer.cpp index 383db73..42b8b1e 100644 --- a/example/diameter/launcher/MyLocalServer.cpp +++ b/example/diameter/launcher/MyLocalServer.cpp @@ -25,7 +25,7 @@ void MyLocalServer::eventRequest(anna::diameter::comm::ServerSession *serverSession, const anna::DataBlock &message) -throw(anna::RuntimeException) { +noexcept(false) { LOGMETHOD(anna::TraceMethod tm("launcher::MyLocalServer", "eventRequest", ANNA_FILE_LOCATION)); // Performance stats: Launcher& my_app = static_cast (anna::app::functions::getApp()); @@ -65,13 +65,13 @@ throw(anna::RuntimeException) { if(my_node->logEnabled()) { anna::diameter::comm::Server *usedServer = entity->getLastUsedResource(); anna::diameter::comm::ClientSession *usedClientSession = usedServer ? usedServer->getLastUsedResource() : NULL; - std::string detail = usedClientSession ? usedClientSession->asString() : ""; // esto no deberia ocurrir + std::string detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // esto no deberia ocurrir my_node->writeLogFile(message, (success ? "fwd2e" : "fwd2eError"), detail); // forwarded } // Testing: - anna::testing::TestManager::instantiate().receiveMessage(message, serverSession); + anna::testing::TestManager::instantiate().receiveDiameterMessage(message, serverSession); return; } @@ -103,7 +103,7 @@ throw(anna::RuntimeException) { } else { // Testing: - anna::testing::TestManager::instantiate().receiveMessage(message, serverSession); + anna::testing::TestManager::instantiate().receiveDiameterMessage(message, serverSession); return; // nothing done } @@ -136,11 +136,11 @@ throw(anna::RuntimeException) { if(analysisOK && programmed) a_reactingAnswers.nextMessage(code); // Testing: - anna::testing::TestManager::instantiate().receiveMessage(message, serverSession); + anna::testing::TestManager::instantiate().receiveDiameterMessage(message, serverSession); } void MyLocalServer::eventResponse(const anna::diameter::comm::Response &response) -throw(anna::RuntimeException) { +noexcept(false) { LOGMETHOD(anna::TraceMethod tm("launcher::MyLocalServer", "eventResponse", ANNA_FILE_LOCATION)); Launcher& my_app = static_cast (anna::app::functions::getApp()); anna::diameter::comm::OriginHost * my_node = my_app.getOriginHost(getEngine()->getOriginHostName()); @@ -199,7 +199,7 @@ throw(anna::RuntimeException) { anna::diameter::comm::ClientSession *usedClientSession = my_node->getCommEngine()->findClientSession(request->getRequestClientSessionKey()); std::string detail; - if(my_node->logEnabled()) detail = usedClientSession ? usedClientSession->asString() : ""; // this should not happen + if(my_node->logEnabled()) detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // this should not happen anna::diameter::comm::Message *msg; try { @@ -227,11 +227,11 @@ throw(anna::RuntimeException) { } // Testing: - if(isOK) anna::testing::TestManager::instantiate().receiveMessage(*message, serverSession); + if(isOK) anna::testing::TestManager::instantiate().receiveDiameterMessage(*message, serverSession); } void MyLocalServer::eventUnknownResponse(anna::diameter::comm::ServerSession *serverSession, const anna::DataBlock &message) -throw(anna::RuntimeException) { +noexcept(false) { LOGMETHOD(anna::TraceMethod tm("launcher::MyLocalServer", "eventUnknownResponse", ANNA_FILE_LOCATION)); // Performance stats: Launcher& my_app = static_cast (anna::app::functions::getApp()); @@ -253,7 +253,7 @@ throw(anna::RuntimeException) { } void MyLocalServer::eventDPA(anna::diameter::comm::ServerSession *serverSession, const anna::DataBlock &message) -throw(anna::RuntimeException) { +noexcept(false) { LOGMETHOD(anna::TraceMethod tm("launcher::MyLocalServer", "eventDPA", ANNA_FILE_LOCATION)); // Performance stats: Launcher& my_app = static_cast (anna::app::functions::getApp()); @@ -275,5 +275,5 @@ throw(anna::RuntimeException) { if(my_node->logEnabled()) my_node->writeLogFile(message, "recvfc", serverSession->asString()); // Testing: - anna::testing::TestManager::instantiate().receiveMessage(message, serverSession); + anna::testing::TestManager::instantiate().receiveDiameterMessage(message, serverSession); }