Enhanced zap_channel_done in zap_io.c to set channel->state to ZAP_CHANNEL_STATE_DOWN.

Befor that the function only sets init_state to DOWN, which is quite bad when there are
hanging channels with state <> DOWN and ozmod_isdn.c make it decisions on that.


git-svn-id: http://svn.openzap.org/svn/openzap/trunk@674 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Helmut Kuper 2009-02-26 08:31:04 +00:00
parent 94a99e9906
commit 34c005b3de
1 changed files with 1 additions and 0 deletions

View File

@ -1131,6 +1131,7 @@ zap_status_t zap_channel_done(zap_channel_t *zchan)
zap_clear_flag_locked(zchan, ZAP_CHANNEL_MEDIA);
zap_clear_flag_locked(zchan, ZAP_CHANNEL_ANSWERED);
zchan->init_state = ZAP_CHANNEL_STATE_DOWN;
zchan->state = ZAP_CHANNEL_STATE_DOWN;
zap_log(ZAP_LOG_DEBUG, "channel done %u:%u\n", zchan->span_id, zchan->chan_id);
return ZAP_SUCCESS;