[Asterisk-cvs] zaptel wcfxs.c,1.60,1.61

markster at lists.digium.com markster at lists.digium.com
Tue May 18 21:32:46 CDT 2004


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv20030

Modified Files:
	wcfxs.c 
Log Message:
Check before doing battery detect


Index: wcfxs.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcfxs.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- wcfxs.c	19 May 2004 01:18:03 -0000	1.60
+++ wcfxs.c	19 May 2004 01:45:04 -0000	1.61
@@ -1205,6 +1205,20 @@
 {
 	unsigned char res;
 	signed char b;
+	/* Try to track issues that plague slot one FXO's */
+	b = wcfxs_getreg(wc, card, 5);
+	if ((b & 0x2) || !(b & 0x8)) {
+		/* Not good -- don't look at anything else */
+		return;
+	}
+	b &= 0x9;
+	if (wc->mod.fxo.offhook[card]) {
+		if (b != 0x9)
+			wcfxs_setreg(wc, card, 5, 0x9);
+	} else {
+		if (b != 0x8)
+			wcfxs_setreg(wc, card, 5, 0x8);
+	}
 #ifndef AUDIO_RINGCHECK
 	if (!wc->mod.fxo.offhook[card]) {
 		res = wcfxs_getreg(wc, card, 5);
@@ -1234,20 +1248,6 @@
 		}
 	}
 #endif
-	/* Try to track issues that plague slot one FXO's */
-	b = wcfxs_getreg(wc, card, 5);
-	if ((b & 0x2) || !(b & 0x8)) {
-		/* Not good -- don't look at anything else */
-		return;
-	}
-	b &= 0x9;
-	if (wc->mod.fxo.offhook[card]) {
-		if (b != 0x9)
-			wcfxs_setreg(wc, card, 5, 0x9);
-	} else {
-		if (b != 0x8)
-			wcfxs_setreg(wc, card, 5, 0x8);
-	}
 	b = wcfxs_getreg(wc, card, 29);
 #if 0 
 	{




More information about the svn-commits mailing list