Fixed jingle channel hangup reason (avoid setting it to failure when session termination reason is missing).

git-svn-id: http://yate.null.ro/svn/yate/trunk@3152 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2010-03-29 10:08:51 +00:00
parent acee06f53d
commit 428653c665
1 changed files with 4 additions and 2 deletions

View File

@ -1314,8 +1314,10 @@ bool YJGConnection::handleEvent(JGEvent* event)
Debug(this,DebugInfo,
"Session terminated with reason='%s' text='%s' [%p]",
reason,event->text().c_str(),this);
int jingleReason = lookup(reason,JGSession::s_reasons,JGSession::ReasonGeneral);
setReason(lookup(jingleReason,s_errMap,reason));
if (!TelEngine::null(reason)) {
int jingleReason = lookup(reason,JGSession::s_reasons,JGSession::ReasonGeneral);
setReason(lookup(jingleReason,s_errMap,reason));
}
return false;
}