Make sure we disconnect a SIP call on all branches of hangup.
Fixes BYE without CANCEL not being propagated. git-svn-id: http://yate.null.ro/svn/yate/trunk@4994 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
82513bee25
commit
b682d50334
|
@ -5097,13 +5097,17 @@ void YateSIPConnection::hangup()
|
|||
if (m_reason)
|
||||
m->setParam("reason",m_reason);
|
||||
Engine::enqueue(m);
|
||||
if (!error)
|
||||
error = m_reason.c_str();
|
||||
switch (m_state) {
|
||||
case Cleared:
|
||||
clearTransaction();
|
||||
disconnect(error,parameters());
|
||||
return;
|
||||
case Incoming:
|
||||
if (m_tr) {
|
||||
clearTransaction();
|
||||
disconnect(error,parameters());
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -5163,8 +5167,6 @@ void YateSIPConnection::hangup()
|
|||
}
|
||||
}
|
||||
m_byebye = false;
|
||||
if (!error)
|
||||
error = m_reason.c_str();
|
||||
disconnect(error,parameters());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue