From 107bc1d525da0219057852050e1900a189baa468 Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Wed, 26 Oct 2016 09:59:03 +0200 Subject: [PATCH] Improve output --- example/diameter/launcher/Procedure.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/example/diameter/launcher/Procedure.cpp b/example/diameter/launcher/Procedure.cpp index 6b0fabf..fff5a91 100644 --- a/example/diameter/launcher/Procedure.cpp +++ b/example/diameter/launcher/Procedure.cpp @@ -8,7 +8,7 @@ // Standard #include #include -#include +//#include // Project #include @@ -69,14 +69,6 @@ void Procedure::execute(const std::string &args, std::string &response) throw(a std::string ccr_t = ((tok_it != targs.end()) ? anna::Tokenizer::data(tok_it):""); bool haveTermination = (ccr_t != ""); - //response = "\n\nInitial sequence: "; response += seq_i; response += "\n"; - //response += "Final sequence: "; response += seq_f; response += "\n"; - //response += "Sequence digits: "; response += digits; response += "\n"; - //response += "CCR-Initial xml: "; response += ccr_i; response += "\n"; - //if (haveTermination) { - // response += "CCR-Termination xml: "; response += ccr_t; response += "\n"; - //} - // Test cases cycles: unsigned int ll_seq_i = std::atol(seq_i.c_str()); unsigned int ll_seq_f = std::atol(seq_f.c_str()); @@ -227,9 +219,8 @@ void Procedure::execute(const std::string &args, std::string &response) throw(a sprintf(cad_aux, ndigit_format, ll_seq); sprintf(cad_framed, "%08x", ll_seq); - if (ll_seq % 10000 == 0) { - std::cout << "Processing sequence " << ll_seq << std::endl; - } + // Activity indicator: + if (ll_seq % 10000 == 0) std::cout << "."; sessionId.replace(left_di, i_digits, cad_aux); sessionId.replace(last_semicolon + left_op + 1, i_digits, cad_aux); @@ -282,6 +273,8 @@ void Procedure::execute(const std::string &args, std::string &response) throw(a } } // loop - response = "Programming complete !"; + response = "Completed provision for pid "; response += anna::functions::asString(a_app->getPid()); response += "; range ["; + response += seq_i; response += ", "; response += seq_f; response += "]; scenary: "; + response += "CCR-Initial"; if (haveTermination) response += " + CCR-Termination"; } -- 2.20.1