[Asterisk-cvs] zaptel wcfxs.c,1.64,1.65

markster at lists.digium.com markster at lists.digium.com
Tue May 25 13:52:46 CDT 2004


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

Modified Files:
	wcfxs.c 
Log Message:
On broken hook register, try to restore it


Index: wcfxs.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcfxs.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- wcfxs.c	25 May 2004 15:07:52 -0000	1.64
+++ wcfxs.c	25 May 2004 18:06:57 -0000	1.65
@@ -1216,15 +1216,16 @@
 	unsigned char res;
 #endif	
 	signed char b;
+	int poopy = 0;
 	/* 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 */
 		if (debug)
 			printk("Poopy (%02x) on card %d!\n", b, card + 1); 
-		return;
+		poopy++;
 	}
-	b &= 0x9;
+	b &= 0x9b;
 	if (wc->mod.fxo.offhook[card]) {
 		if (b != 0x9)
 			wcfxs_setreg(wc, card, 5, 0x9);
@@ -1232,6 +1233,8 @@
 		if (b != 0x8)
 			wcfxs_setreg(wc, card, 5, 0x8);
 	}
+	if (poopy)
+		return;
 #ifndef AUDIO_RINGCHECK
 	if (!wc->mod.fxo.offhook[card]) {
 		res = wcfxs_getreg(wc, card, 5);




More information about the svn-commits mailing list