Hi,

if you logAdd 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. The attached patch makes this change.

br

Szo
diff --git a/apps/monitoring/Monitoring.cpp b/apps/monitoring/Monitoring.cpp
index cf4fc06..ca4debe 100644
--- a/apps/monitoring/Monitoring.cpp
+++ b/apps/monitoring/Monitoring.cpp
@@ -171,7 +171,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

Reply via email to