- fixes a memory leak within AmEventDispatcher.

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1028 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Raphael Coeffic 18 years ago
parent 67cb344b0d
commit 66ada55453

@ -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<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");
}
}

Loading…
Cancel
Save