]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Enhanced zap_channel_done in zap_io.c to set channel->state to ZAP_CHANNEL_STATE_DOWN.
authorHelmut Kuper <helmut.kuper@ewetel.de>
Thu, 26 Feb 2009 08:31:04 +0000 (08:31 +0000)
committerHelmut Kuper <helmut.kuper@ewetel.de>
Thu, 26 Feb 2009 08:31:04 +0000 (08:31 +0000)
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

libs/openzap/src/zap_io.c

index 16dca8afcdc5b535a2a96d97aa3af710d4878063..e71f0cda9caf583882e6c98aee5d7fa53baeba89 100644 (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;