X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=2e5b52b090ae6226d932b3aa67062f0e66d7ef8f;hb=f844fa068cf757c0b517318dc1437bd29f319d94;hp=563ee5b546b66969f0ff0c32406b501bf131361d;hpb=51a6c4b326153804233788bd8fda4966052d4288;p=anna.git diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 563ee5b..2e5b52b 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -1195,6 +1195,9 @@ std::string Launcher::help() const throw() { result += "\n sendxml2e|[|]"; result += "\n Sends xml source file (pathfile) to entity (it would be a"; result += "\n 'forward' event if it came through local server endpoint)."; + result += "\n Take into account that the xml message is encoded just on"; + result += "\n call. The xml file is not longer needed neither interpreted"; + result += "\n in case of modification, after calling this command."; result += "\n The step number should be provided for answers to indicate"; result += "\n the 'wait for request' corresponding step. If you miss this"; result += "\n reference, the sequence information (hop-by-hop, end-to-end)"; @@ -1476,7 +1479,7 @@ std::string Launcher::help() const throw() { void Launcher::eventOperation(const std::string &operation, std::string &response_content) throw(anna::RuntimeException) { LOGMETHOD(anna::TraceMethod tm("Launcher", "eventOperation", ANNA_FILE_LOCATION)); if (operation == "") return; // ignore - LOGDEBUG(anna::Logger::debug(operation, ANNA_FILE_LOCATION)); + LOGDEBUG(anna::Logger::debug(anna::functions::asString("Operation: %s", operation.c_str()), ANNA_FILE_LOCATION)); // Default response: response_content = "Operation processed with exception: "; @@ -2099,13 +2102,11 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons throw anna::RuntimeException("Wrong body content format on HTTP Request. Use 'help' management command to see more information.", ANNA_FILE_LOCATION); if(param3 == "") throw anna::RuntimeException(anna::functions::asString("Missing xml file for '%s' command in test id operation", param2.c_str()), ANNA_FILE_LOCATION); codecMsg.loadXML(param3); - if (codecMsg.isRequest()) { - if (param4 != "") - throw anna::RuntimeException("Step number is provided with answers (to resolve the corresponding 'wait for request' step), but NOT with requests", ANNA_FILE_LOCATION); - } - else { - if (param4 == "") LOGWARNING(anna::Logger::warning("Step number has not been provided. Take into account that this answer message will be sent 'as is' and sequence information could be wrong at the remote peer", ANNA_FILE_LOCATION)); - } + LOGWARNING( + if (!codecMsg.isRequest() && (param4 == "")) + anna::Logger::warning("Step number has not been provided. Take into account that this answer message will be sent 'as is' and sequence information could be wrong at the remote peer", ANNA_FILE_LOCATION); + ); + updateOperatedOriginHostWithMessage(codecMsg); int stepNumber = ((param4 != "") ? atoi(param4.c_str()):-1);