From: Eduardo Ramos Testillano Date: Tue, 17 Mar 2015 00:16:55 +0000 (+0100) Subject: Answer programming only for xml messages. X-Git-Tag: REFACTORING_TESTING_LIBRARY~223 X-Git-Url: https://git.teslayout.com/public/public/public/?a=commitdiff_plain;h=485d48440fec4b00419b038883bb4ddb8e1a523c;p=anna.git Answer programming only for xml messages. --- diff --git a/example/diameter/launcher/main.cpp b/example/diameter/launcher/main.cpp index c0d4d37..033070b 100644 --- a/example/diameter/launcher/main.cpp +++ b/example/diameter/launcher/main.cpp @@ -757,20 +757,18 @@ std::string Launcher::help() const throw() { result += "\nanswerxml|[source_file] Same as 'answerxml2c'."; result += "\n List programmed answers if no parameter provided."; result += "\n"; - result += "\nSame operations are available using hexadecimal content (hex formatted files) which also allow to test"; + result += "\nSend operations are available using hexadecimal content (hex formatted files) which also allow to test"; result += "\nspecial scenarios (protocol errors):"; result += "\n"; result += "\nsendhex2e| Sends hex source file (pathfile) through configured entity."; result += "\nsendhex2c| Sends hex source file (pathfile) to client."; result += "\nsendhex| Same as 'sendhex2e'."; - result += "\nanswerhex2e|[source_file] Answer hex source file (pathfile) for corresponding request from entity."; - result += "\nanswerhex2c|[source_file] Answer hex source file (pathfile) for corresponding request from client."; - result += "\nanswerhex|[source_file] Same as 'answerhex2c'."; - result += "\n List programmed answers if no parameter provided."; - result += "\n"; result += "\n"; + result += "\nAnswer programming in hexadecimal is not really neccessary (you could use send primitives) and also"; + result += "\nis intended to be used with decoded messages in order to replace things like hop by hop, end to end,"; + result += "\nsubscriber id, session id, etc."; result += "\n"; - result += "\nIf a request is received, answer map (built with 'answerxml/hex<[2c] or 2e>' operations) will be"; + result += "\nIf a request is received, answer map (built with 'answerxml<[2c] or 2e>' operations) will be"; result += "\n checked to find a corresponding programmed answer to be replied(*). If no ocurrence is found,"; result += "\n or answer message was received, the message is forwarded to the other side (entity or client),"; result += "\n or nothing but trace when no peer at that side is configured. Answer to client have sense when"; @@ -1958,7 +1956,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons startDiameterServer(diameterServerSessions); else getDiameterLocalServer()->setMaxConnections(diameterServerSessions); - } else if ((opType == "answerxml") || (opType == "answerxml2c") || (opType == "answerhex") || (opType == "answerhex2c")) { + } else if ((opType == "answerxml") || (opType == "answerxml2c")) { anna::diameter::comm::LocalServer *localServer = getDiameterLocalServer(); if (!localServer) @@ -1989,7 +1987,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons response_content = "Programmed answers dumped on stdout\n"; return; } - } else if ((opType == "answerxml2e") || (opType == "answerhex2e")) { + } else if (opType == "answerxml2e") { anna::diameter::comm::Entity *entity = getEntity(); if (!entity) @@ -2074,12 +2072,12 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons response_content += param1; response_content += "' loaded."; response_content += "\n"; - } else if ((opType == "answerxml") || (opType == "answerxml2c") || (opType == "answerhex") || (opType == "answerhex2c")) { + } else if ((opType == "answerxml") || (opType == "answerxml2c")) { response_content += "Answer to client '"; response_content += param1; response_content += "' programmed."; response_content += "\n"; - } else if ((opType == "answerxml2e") || (opType == "answerhex2e")) { + } else if (opType == "answerxml2e") { response_content += "Answer to entity '"; response_content += param1; response_content += "' programmed.";