properly tear down on a restart.

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@411 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2008-02-27 23:30:49 +00:00
parent 7ffa6362a7
commit 64c49d88d7
1 changed files with 3 additions and 2 deletions

View File

@ -327,8 +327,9 @@ static __inline__ void state_advance(zap_channel_t *zchan)
break;
case ZAP_CHANNEL_STATE_RESTART:
{
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN);
zap_channel_close(&zchan);
if (zchan->last_state > ZAP_CHANNEL_STATE_HANGUP) {
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_HANGUP);
}
}
break;
case ZAP_CHANNEL_STATE_PROGRESS_MEDIA: