From 66ada55453ea0b093915775987c278fbbb6dfafe Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Mon, 23 Jun 2008 11:13:09 +0000 Subject: [PATCH] - fixes a memory leak within AmEventDispatcher. git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1028 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmSessionContainer.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/core/AmSessionContainer.cpp b/core/AmSessionContainer.cpp index 198ed427..e45198a5 100644 --- a/core/AmSessionContainer.cpp +++ b/core/AmSessionContainer.cpp @@ -135,22 +135,17 @@ void AmSessionContainer::stopAndQueue(AmSession* s) 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(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"); } }