From: Matthew Fredrickson Date: Tue, 17 Jan 2006 23:13:42 +0000 (+0000) Subject: Fix answeronpolarityswitch and hanguponpolarityswitch when both are yes (#6229) X-Git-Tag: 1.4.0-beta1~2903 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ba6a2be1cf473805956b027ab79a784bde53f73;p=thirdparty%2Fasterisk.git Fix answeronpolarityswitch and hanguponpolarityswitch when both are yes (#6229) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8155 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index dbf7ca0daf..705ddf5f92 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -4268,6 +4268,9 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast) (ast->_state == AST_STATE_RINGING))) { ast_log(LOG_DEBUG, "Answering on polarity switch!\n"); ast_setstate(p->owner, AST_STATE_UP); + if (p->hanguponpolarityswitch) { + gettimeofday(&p->polaritydelaytv, NULL); + } } else ast_log(LOG_DEBUG, "Ignore switch to REVERSED Polarity on channel %d, state %d\n", p->channel, ast->_state); }