From 305623ae652ae8216ee32e6357aa82c8b79498d7 Mon Sep 17 00:00:00 2001 From: sruffell Date: Thu, 24 Apr 2008 18:17:12 +0000 Subject: Fixes a regression in versions 1.2.25 and 1.4.19 identified by korihor where the wctdm driver was no longer properly recognizing polarity reversals. (closes issue #12419) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@4194 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wctdm.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/wctdm.c b/wctdm.c index 0b50771..e64c995 100644 --- a/wctdm.c +++ b/wctdm.c @@ -915,18 +915,18 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card) fxo->battdebounce = battdebounce / MS_PER_CHECK_HOOK; } } + } - if (fxo->lastpol >= 0) { - if (b < 0) { - fxo->lastpol = -1; - fxo->polaritydebounce = POLARITY_DEBOUNCE / MS_PER_CHECK_HOOK; - } - } - if (fxo->lastpol <= 0) { - if (b > 0) { - fxo->lastpol = 1; - fxo->polaritydebounce = POLARITY_DEBOUNCE / MS_PER_CHECK_HOOK; - } + if (fxo->lastpol >= 0) { + if (b < 0) { + fxo->lastpol = -1; + fxo->polaritydebounce = POLARITY_DEBOUNCE / MS_PER_CHECK_HOOK; + } + } + if (fxo->lastpol <= 0) { + if (b > 0) { + fxo->lastpol = 1; + fxo->polaritydebounce = POLARITY_DEBOUNCE / MS_PER_CHECK_HOOK; } } -- cgit v1.2.3