Add nlohmann/json parser
[anna.git] / example / diameter / launcher / MyLocalServer.cpp
index c4f5db7..50ab634 100644 (file)
@@ -71,7 +71,7 @@ throw(anna::RuntimeException) {
 
 
     // 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,7 +136,7 @@ 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)
@@ -149,8 +149,6 @@ throw(anna::RuntimeException) {
   anna::diameter::comm::Message* request = const_cast<anna::diameter::comm::Message*>(response.getRequest());
   const anna::DataBlock* message = response.getMessage();
   const anna::diameter::comm::ServerSession *serverSession = static_cast<const anna::diameter::comm::ServerSession *>(response.getSession());
-  bool isBindResponse = (code == anna::diameter::comm::ClassCode::Bind);
-  bool isApplicationMessage = (code == anna::diameter::comm::ClassCode::ApplicationMessage);
   bool contextExpired = (result == anna::diameter::comm::Response::ResultCode::Timeout);
   bool isUnavailable = (result == anna::diameter::comm::Response::ResultCode::DiameterUnavailable);
   bool isOK = (result == anna::diameter::comm::Response::ResultCode::Success);
@@ -229,7 +227,7 @@ 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)
@@ -277,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);
 }