From b024e74e517f6f2da26722bc258ec48532a2b15e Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Mon, 29 Feb 2016 21:09:54 +0100 Subject: [PATCH] Fixes for Changes in Sy --- example/diameter/launcher/Launcher.cpp | 15 ++++++++------- .../launcher/resources/scripts/tinyTestcase.sh | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 563ee5b..9517372 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)"; @@ -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); diff --git a/example/diameter/launcher/resources/scripts/tinyTestcase.sh b/example/diameter/launcher/resources/scripts/tinyTestcase.sh index 22e2748..bd1c733 100755 --- a/example/diameter/launcher/resources/scripts/tinyTestcase.sh +++ b/example/diameter/launcher/resources/scripts/tinyTestcase.sh @@ -139,7 +139,7 @@ update_testcase () { # Wait the request # Special case for SLR/SLA (code=8388635): the Session-Id is created on client - [ "$code" = "8388635" -a "$adml_type" = "server" ] && { s_wait="test|1|$wait_command|$code|1||||$subscriber" ; REQUEST_STEP=$next_step_number ; } + [ "$code" = "8388635" -a "$adml_type" = "server" ] && { s_wait="test|1|$wait_command|$code|1|||||$subscriber" ; REQUEST_STEP=$next_step_number ; } echo "$s_wait" >> $TESTCASE_BN # Send the answer -- 2.20.1