Module: sems Branch: master Commit: b7f9594ced90ef303d3062670ea7e2d6fc5bd845 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=b7f9594ced90ef303d3062670ea7e2d6fc5bd845
Author: Szókovács Róbert <[email protected]> Committer: Szókovács Róbert <[email protected]> Date: Fri Oct 18 13:41:51 2013 +0200 calling logAdd to add a parameter without "log"ing it first, an artifact ("0") appears in the head of the list, because the std::map will call the default constructor of the AmArg, creating an Undef-type AmArg. In this case, we should not precede the array with this value. --- apps/monitoring/Monitoring.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/apps/monitoring/Monitoring.cpp b/apps/monitoring/Monitoring.cpp index ef5638c..a6ae171 100644 --- a/apps/monitoring/Monitoring.cpp +++ b/apps/monitoring/Monitoring.cpp @@ -230,7 +230,7 @@ void Monitor::logAdd(const AmArg& args, AmArg& ret) { bucket.log_lock.lock(); try { AmArg& val = bucket.log[args[0].asCStr()].info[args[1].asCStr()]; - if (!isArgArray(val)) { + if (!isArgArray(val) && !isArgUndef(val)) { AmArg v1 = val; val = AmArg(); val.push(v1); _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
