Save log in the end
authorEnrico Zini <enrico@enricozini.org>
Fri, 26 Mar 2010 20:04:46 +0000 (20:04 +0000)
committerEnrico Zini <enrico@enricozini.org>
Fri, 26 Mar 2010 20:04:46 +0000 (20:04 +0000)
zavai/gsm.vala

index bf9abc0398cbfadb69e913ba6338b2c3d8b5b43c..f318b55f7692bcac30f8125b3a0a77510bf9e18c 100644 (file)
@@ -351,7 +351,17 @@ public class GSM: zavai.ScriptMonitorService
         });
         zavai.log.log.add(info.log_id, call_info);
 
-        // TODO: remove entry when it's the last possible status
+        // Remove entry when it's the last possible status
+        if (status == "release")
+        {
+            zavai.log.log.end(info.log_id);
+            for (weak List<CallInfo> i = calls; i != null; i = i.next)
+                if (i.data.gsm_id == index)
+                {
+                    calls.delete_link(i);
+                    break;
+                }
+        }
 
         /*
         dbg("cbCallStatus %d, %s, %s" % (id, status, formatDict(properties)))