X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Ftesting%2FTestManager.cpp;fp=example%2Fdiameter%2Flauncher%2Ftesting%2FTestManager.cpp;h=4a6f6887f013469e75afdedde40178c7e3dc14a4;hb=5bf5055ab79aaf464e2491cfbab173ba37ba3419;hp=01487fea7a0790454fbd3fef28e3f4e2f9bfe96e;hpb=913a64fa09cecb0932cfc2d5fd6df8c1b2dc4ca3;p=anna.git diff --git a/example/diameter/launcher/testing/TestManager.cpp b/example/diameter/launcher/testing/TestManager.cpp index 01487fe..4a6f688 100644 --- a/example/diameter/launcher/testing/TestManager.cpp +++ b/example/diameter/launcher/testing/TestManager.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include class TestTimer; @@ -371,7 +371,7 @@ TestCase *TestManager::getTestCaseFromSessionId(const anna::DataBlock &message, return NULL; } -void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *realm, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException) { +void TestManager::receiveMessage(const anna::DataBlock &message, OriginHost *host, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException) { // Testing disabled: if (!tests()) return; @@ -391,10 +391,10 @@ void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *real codecMsg.decode(message); hint += "\n"; hint += codecMsg.asXMLString(); - // // Realm checking: - // std::string messageOR = message.getAvp(anna::diameter::helpers::base::AVPID__Origin_Realm)->getDiameterIdentity()->getValue(); - // if (messageOR != realm->getName()) { - // LOGWARNING(anna::Logger::warning(anna::functions::asString("Received message from realm '%s', with different Origin-Realm: %s", realm->getName().c_str(), messageOR.c_str()), ANNA_FILE_LOCATION)); + // // Host checking: + // std::string messageOH = message.getAvp(anna::diameter::helpers::base::AVPID__Origin_Host)->getDiameterIdentity()->getValue(); + // if (messageOH != host->getName()) { + // LOGWARNING(anna::Logger::warning(anna::functions::asString("Received message from host '%s', with different Origin-Host: %s", host->getName().c_str(), messageOH.c_str()), ANNA_FILE_LOCATION)); // } } catch (anna::RuntimeException &ex) { @@ -411,7 +411,7 @@ void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *real } } -void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *realm, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException) { +void TestManager::receiveMessage(const anna::DataBlock &message, OriginHost *host, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException) { // Testing disabled: if (!tests()) return; @@ -431,10 +431,10 @@ void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *real codecMsg.decode(message); hint += "\n"; hint += codecMsg.asXMLString(); - // // Realm checking: - // std::string messageOR = message.getAvp(anna::diameter::helpers::base::AVPID__Origin_Realm)->getDiameterIdentity()->getValue(); - // if (messageOR != realm->getName()) { - // LOGWARNING(anna::Logger::warning(anna::functions::asString("Received message from realm '%s', with different Origin-Realm: %s", realm->getName().c_str(), messageOR.c_str()), ANNA_FILE_LOCATION)); + // // Host checking: + // std::string messageOH = message.getAvp(anna::diameter::helpers::base::AVPID__Origin_Host)->getDiameterIdentity()->getValue(); + // if (messageOH != host->getName()) { + // LOGWARNING(anna::Logger::warning(anna::functions::asString("Received message from host '%s', with different Origin-Host: %s", host->getName().c_str(), messageOH.c_str()), ANNA_FILE_LOCATION)); // } } catch (anna::RuntimeException &ex) {