Changed the behaviour on stanza timeout: try to hangup before destroying the session.

git-svn-id: http://voip.null.ro/svn/yate@1920 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2008-04-17 09:53:24 +00:00
parent 31c3555b96
commit 72ce092311
1 changed files with 3 additions and 1 deletions

View File

@ -553,7 +553,9 @@ JGEvent* JGSession::getEvent(u_int64_t time)
if (tmp->timeout(time)) {
Debug(m_engine,DebugNote,"Call(%s). Sent stanza ('%s') timed out [%p]",
m_sid.c_str(),tmp->c_str(),this);
m_lastEvent = new JGEvent(JGEvent::Terminated,this,0,"timeout");
// Notify the peer anyway (something may be wrong)
if (!hangup(false,"Timeout"))
m_lastEvent = new JGEvent(JGEvent::Terminated,this,0,"timeout");
}
}
}