In YateH323Connection::OnCleared() clean up the m_chan pointer as suggested by Alain Brassard in Mantis issue #201.

git-svn-id: http://yate.null.ro/svn/yate/trunk@3123 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2010-03-12 15:35:56 +00:00
parent b7d58ccd0b
commit 118d800e9b
1 changed files with 5 additions and 2 deletions

View File

@ -1337,9 +1337,12 @@ void YateH323Connection::OnCleared()
error,rtext,reason,this);
TelEngine::Lock lock(m_mutex);
if (m_chan && m_chan->ref()) {
YateH323Chan* tmp = m_chan;
m_chan = 0;
lock.drop();
m_chan->disconnect(error ? error : rtext);
m_chan->deref();
tmp->disconnect(error ? error : rtext);
tmp->finish();
tmp->deref();
}
}