X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fmain.cpp;h=c0d4d37f1000bae06c661dec11831a599634811d;hb=bed9cb7ee096fbd3981de37972c86bce00840022;hp=416acce42a4a12fe525242dec85f2b0a7df9a831;hpb=1b238ab9e7ece2279ea37f4cb642f13501b26721;p=anna.git diff --git a/example/diameter/launcher/main.cpp b/example/diameter/launcher/main.cpp index 416acce..c0d4d37 100644 --- a/example/diameter/launcher/main.cpp +++ b/example/diameter/launcher/main.cpp @@ -1748,7 +1748,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons } else if (opType == "decode") { // Get DataBlock from file with hex content: if (!getDataBlockFromHexFile(param1, db_aux)) - throw anna::RuntimeException("Cannot interpret hexadecimal content from file provided", ANNA_FILE_LOCATION); + throw anna::RuntimeException("Error reading hex file provided", ANNA_FILE_LOCATION); // Decode try { G_codecMsg.decode(db_aux); } catch (anna::RuntimeException &ex) { ex.trace(); } @@ -1802,7 +1802,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons else { // Get DataBlock from file with hex content: if (!getDataBlockFromHexFile(param1, db_aux)) - throw anna::RuntimeException("Cannot interpret hexadecimal content from file provided", ANNA_FILE_LOCATION); + throw anna::RuntimeException("Error reading hex file provided", ANNA_FILE_LOCATION); G_commMsgSent2e.setBody(db_aux); } @@ -1919,7 +1919,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons throw anna::RuntimeException("Wrong body content format on HTTP Request for 'burst' operation (unexpected action parameter). See help", ANNA_FILE_LOCATION); } - } else if ((opType == "sendxml2c")||(opType == "sendhex2c")) { + } else if ((opType == "sendxml2c") || (opType == "sendhex2c")) { anna::diameter::comm::LocalServer *localServer = getDiameterLocalServer(); if (!localServer) throw anna::RuntimeException("No local server configured to send the message", ANNA_FILE_LOCATION); @@ -1932,7 +1932,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons else { // Get DataBlock from file with hex content: if (!getDataBlockFromHexFile(param1, db_aux)) - throw anna::RuntimeException("Cannot interpret hexadecimal content from file provided", ANNA_FILE_LOCATION); + throw anna::RuntimeException("Error reading hex file provided", ANNA_FILE_LOCATION); G_commMsgSent2c.setBody(db_aux); } @@ -1958,7 +1958,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons startDiameterServer(diameterServerSessions); else getDiameterLocalServer()->setMaxConnections(diameterServerSessions); - } else if ((opType == "answerxml") || (opType == "answerxml2c")) { + } else if ((opType == "answerxml") || (opType == "answerxml2c") || (opType == "answerhex") || (opType == "answerhex2c")) { anna::diameter::comm::LocalServer *localServer = getDiameterLocalServer(); if (!localServer) @@ -1989,7 +1989,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons response_content = "Programmed answers dumped on stdout\n"; return; } - } else if ((opType == "answerxml2e")) { + } else if ((opType == "answerxml2e") || (opType == "answerhex2e")) { anna::diameter::comm::Entity *entity = getEntity(); if (!entity) @@ -2074,12 +2074,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")) { + } else if ((opType == "answerxml") || (opType == "answerxml2c") || (opType == "answerhex") || (opType == "answerhex2c")) { response_content += "Answer to client '"; response_content += param1; response_content += "' programmed."; response_content += "\n"; - } else if ((opType == "answerxml2e")) { + } else if ((opType == "answerxml2e") || (opType == "answerhex2e")) { response_content += "Answer to entity '"; response_content += param1; response_content += "' programmed.";