Fix: when timeout or another anomaly, testing manager must not invoked with receiveMessage, or message could not be decoded and a core dump is created.
Feature: access working node from application
a_operatedHost = getOriginHost(message);
}
+OriginHost *Launcher::getWorkingNode() const throw(anna::RuntimeException) {
+ if(!a_workingNode)
+ throw anna::RuntimeException("Working node not identified (try to load services)", ANNA_FILE_LOCATION);
+
+ return a_workingNode;
+}
+
OriginHost *Launcher::getOperatedHost() const throw(anna::RuntimeException) {
if(!a_operatedHost)
throw anna::RuntimeException("Node not identified (try to force a specific Origin-Host with 'node' operation)", ANNA_FILE_LOCATION);
std::string args = ((operation.find("dynamic|") == 0) && (op_size > 8)) ? operation.substr(8) : "";
if (args == "" && op_size != 7)
throw anna::RuntimeException("Wrong body content format on HTTP Request. Use 'help' management command to see more information.", ANNA_FILE_LOCATION);
- p.execute(args, response_content);
+ try {
+ p.execute(args, response_content);
+ }
+ catch(anna::RuntimeException &ex) {
+ ex.trace();
+ response_content = ex.asString();
+ return;
+ }
return;
}
// Operated host for communication resources smart assignment ////////////////////////////////////////////////////////////
void updateOperatedOriginHostWithMessage(const anna::diameter::codec::Message &message) throw(anna::RuntimeException);
+ OriginHost *getWorkingNode() const throw(anna::RuntimeException);
OriginHost *getOperatedHost() const throw(anna::RuntimeException);
MyDiameterEntity *getOperatedEntity() const throw(anna::RuntimeException);
MyLocalServer *getOperatedServer() const throw(anna::RuntimeException);
if(isOK || contextExpired) my_node->sendBurstMessage();
// Testing:
- TestManager::instantiate().receiveMessage(*message, my_node, clientSession);
+ if(isOK) TestManager::instantiate().receiveMessage(*message, my_node, clientSession);
}
void MyDiameterEntity::eventUnknownResponse(anna::diameter::comm::ClientSession *clientSession, const anna::DataBlock &message)
}
// Testing:
- TestManager::instantiate().receiveMessage(*message, my_node, serverSession);
+ if(isOK) TestManager::instantiate().receiveMessage(*message, my_node, serverSession);
}
void MyLocalServer::eventUnknownResponse(anna::diameter::comm::ServerSession *serverSession, const anna::DataBlock &message)