Fixes for Changes in Sy
[anna.git] / example / diameter / launcher / Launcher.cpp
index 563ee5b..9517372 100644 (file)
@@ -1195,6 +1195,9 @@ std::string Launcher::help() const throw() {
   result += "\n                              sendxml2e|<source_file>[|<step number>]";
   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);