#include <TestCase.hpp>
#include <TestClock.hpp>
#include <Launcher.hpp>
+#include <RealmNode.hpp>
class TestTimer;
return NULL;
}
-void TestManager::receiveMessage(const anna::DataBlock &message, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException) {
+void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *realm, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException) {
// Testing disabled:
if (!tests()) return;
std::string hint = "Uncovered condition for received message from entity over Session-Id '"; hint += sessionId; hint += "':";
try {
- Launcher& my_app = static_cast <Launcher&>(anna::app::functions::getApp());
- static anna::diameter::codec::Message codecMsg(my_app.getCodecEngine());
+ static anna::diameter::codec::Message codecMsg;
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));
+ // }
}
catch (anna::RuntimeException &ex) {
ex.trace();
}
}
-void TestManager::receiveMessage(const anna::DataBlock &message, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException) {
+void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *realm, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException) {
// Testing disabled:
if (!tests()) return;
std::string hint = "Uncovered condition for received message from client over Session-Id '"; hint += sessionId; hint += "':";
try {
- Launcher& my_app = static_cast <Launcher&>(anna::app::functions::getApp());
- static anna::diameter::codec::Message codecMsg(my_app.getCodecEngine());
+ static anna::diameter::codec::Message codecMsg;
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));
+ // }
}
catch (anna::RuntimeException &ex) {
ex.trace();