aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-17 23:13:42 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-17 23:13:42 +0000
commit2a43f4e15d108a17144abe12c99848c4e9bdaf6b (patch)
treeaccfe2346a735907ad94fcbe72148c2542d00ade /channels/chan_zap.c
parent3578d9e47885da555baa7417ace318a8637f83b2 (diff)
Fix answeronpolarityswitch and hanguponpolarityswitch when both are yes (#6229)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8155 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r--channels/chan_zap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index dbf7ca0da..705ddf5f9 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);
}