[zaptel-commits] russell: branch 1.2 r4442 - /branches/1.2/wctdm.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Aug 1 08:50:25 CDT 2008


Author: russell
Date: Fri Aug  1 08:50:24 2008
New Revision: 4442

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4442
Log:
Fix detection of ringing on FXO ports.  This change was made to wctdm in 1.4
in revision 4096, but when that code got backported to 1.2 in rev 4132, the
change was not made.  I found it just by comparing the differences in the
drivers between 1.2 and 1.4.

(closes issue #13188)
Reported by: pyves
Patches:
      20080731__issue13188_revert4123z12.diff uploaded by bbryant (license 36)
      issue13188.patch1.txt uploaded by russell (license 2)
Tested by: russell, bbryant

Modified:
    branches/1.2/wctdm.c

Modified: branches/1.2/wctdm.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm.c?view=diff&rev=4442&r1=4441&r2=4442
==============================================================================
--- branches/1.2/wctdm.c (original)
+++ branches/1.2/wctdm.c Fri Aug  1 08:50:24 2008
@@ -863,16 +863,10 @@
 					fxo->battalarm = (battalarm - battdebounce) / MS_PER_CHECK_HOOK;
 #endif
 				}
+			} else {
+				/* start the debounce timer to verify that battery has been lost */
+				fxo->battdebounce = battdebounce / MS_PER_CHECK_HOOK;
 			}
-			wc->mod[card].fxo.battdebounce = battdebounce;
-		}
-	} else if (abs(b) > battthresh) {
-		if (!wc->mod[card].fxo.battery && !wc->mod[card].fxo.battdebounce) {
-			if (debug)
-				printk("BATTERY on %d/%d (%s)!\n", wc->span.spanno, card + 1, 
-					(b < 0) ? "-" : "+");			    
-				/* start the debounce timer to verify that battery has been lost */
-			fxo->battdebounce = battdebounce / MS_PER_CHECK_HOOK;
 		}
 	} else {
 		/* possible existing states:




More information about the zaptel-commits mailing list