- resolved possible race condition (thx to Mark Sidell for reporting).

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@564 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Raphael Coeffic 19 years ago
parent 78816a284a
commit 8a6e4bec6b

@ -270,14 +270,16 @@ bool AmSessionContainer::postEvent(const string& callid,
as_mut.lock();
AmSession* s = getSession(callid,remote_tag);
as_mut.unlock();
if(!s){
as_mut.unlock();
delete event;
return false;
}
s->postEvent(event);
as_mut.unlock();
return true;
}
@ -287,12 +289,13 @@ bool AmSessionContainer::postEvent(const string& local_tag,
// DBG("postEvent: local_tag = %s\n",local_tag.c_str());
as_mut.lock();
AmSession* s = getSession(local_tag);
as_mut.unlock();
if (s != NULL) {
s->postEvent(event);
as_mut.unlock();
return true;
}
as_mut.unlock();
// try session factories
AmSessionFactory* sf = AmPlugIn::instance()->getFactory4App(local_tag);

Loading…
Cancel
Save