From 9fd3b447e4025eeba1a0d5126188376848fe3c0c Mon Sep 17 00:00:00 2001 From: sruffell Date: Sun, 28 Sep 2008 17:29:07 +0000 Subject: mprove reliablity of UK caller ID for the TDM400P by not allowing the ringdebounce to be decremented when it is at 0 already. Related to issue #12531. Reported mattbrown, fix suggested by benbrown. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4547 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- kernel/wctdm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/wctdm.c b/kernel/wctdm.c index 8d47c61..7176c68 100644 --- a/kernel/wctdm.c +++ b/kernel/wctdm.c @@ -772,7 +772,8 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card) if (!fxo->offhook) { if (fwringdetect) { res = wc->reg0shadow[card] & 0x60; - if (fxo->ringdebounce--) { + if (fxo->ringdebounce) { + --fxo->ringdebounce; if (res && (res != fxo->lastrdtx) && (fxo->battery == BATTERY_PRESENT)) { if (!fxo->wasringing) { -- cgit v1.2.3