Author: rco
Date: 2008-06-23 13:13:09 +0200 (Mon, 23 Jun 2008)
New Revision: 1028

Modified:
   trunk/core/AmSessionContainer.cpp
Log:
- fixes a memory leak within AmEventDispatcher.


Modified: trunk/core/AmSessionContainer.cpp
===================================================================
--- trunk/core/AmSessionContainer.cpp   2008-06-21 13:22:58 UTC (rev 1027)
+++ trunk/core/AmSessionContainer.cpp   2008-06-23 11:13:09 UTC (rev 1028)
@@ -135,22 +135,17 @@
 
 void AmSessionContainer::destroySession(AmSession* s)
 {
-  destroySession(s->getLocalTag());
-}
-
-void AmSessionContainer::destroySession(const string& local_tag)
-{
-    AmSession* s = NULL;
     AmEventQueueInterface* q = AmEventDispatcher::instance()->
-      delEventQueue(local_tag);
+       delEventQueue(s->getLocalTag(),
+                     s->getCallID(),
+                     s->getRemoteTag());
     
-    if(q &&
-       (s = dynamic_cast<AmSession*>(q))) {
-      
-      stopAndQueue(s);
+    if(q) {
+       
+       stopAndQueue(s);
     }
     else {
-      DBG("could not remove session: id not found or wrong type\n");
+       WARN("could not remove session: id not found or wrong type\n");
     }
 }
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to