[Asterisk-Dev] Please accept this patch to wcfxo.c to identify itself with debug set .

Mr. James W. Laferriere babydr at baby-dragons.com
Sat Oct 29 07:22:24 MST 2005


	Hello All ,  Please accept this patch to wcfxo.c to identify itself 
	with debug set at modprobe .  Hth ,  JimL

ie: from /etc/modprobe.conf

install wcfxo /sbin/modprobe --ignore-install wcfxo debug=1 && /sbin/ztcfg -vv -d9


Index: wcfxo.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcfxo.c,v
retrieving revision 1.31
diff -u -r1.31 wcfxo.c
--- wcfxo.c	4 Oct 2005 23:08:49 -0000	1.31
+++ wcfxo.c	29 Oct 2005 09:12:05 -0000
@@ -323,7 +323,7 @@
 					wc->regoffset = wc->regoffset % (sizeof(wecareregs) / sizeof(wecareregs[0]));
 				}
 				if (debug)
-					printk("New regoffset: %d\n", wc->regoffset);
+					printk("wcfxo: New regoffset: %d\n", wc->regoffset);
 			}
 			/* Receive into the proper register */
 			wc->readregs[realreg] = realval;
@@ -354,14 +354,14 @@
 		if (!wc->ring && (wc->pegcount > PEGCOUNT)) {
 			/* It's ringing */
 			if (debug)
-				printk("RING!\n");
+				printk("wcfxo: RING!\n");
 			zt_hooksig(&wc->chan, ZT_RXSIG_RING);
 			wc->ring = 1;
 		}
 		if (wc->ring && !wc->pegcount) {
 			/* No more ring */
 			if (debug)
-				printk("NO RING!\n");
+				printk("wcfxo: NO RING!\n");
 			zt_hooksig(&wc->chan, ZT_RXSIG_OFFHOOK);
 			wc->ring = 0;
 		}
@@ -467,13 +467,13 @@
 #endif
 			if (wc->battery && !wc->battdebounce) {
 				if (debug)
-					printk("NO BATTERY!\n");
+					printk("wcfxo: NO BATTERY!\n");
 				wc->battery =  0;
 #ifdef	JAPAN
 				if ((!wc->ohdebounce) && wc->offhook) {
 					zt_hooksig(&wc->chan, ZT_RXSIG_ONHOOK);
 					if (debug)
-						printk("Signalled On Hook\n");
+						printk("wcfxo: Signalled On Hook\n");
 #ifdef	ZERO_BATT_RING
 					wc->onhook++;
 #endif
@@ -495,13 +495,13 @@
 		} else if (b == 0xf) {
 			if (!wc->battery && !wc->battdebounce) {
 				if (debug)
-					printk("BATTERY!\n");
+					printk("wcfxo: BATTERY!\n");
 #ifdef	ZERO_BATT_RING
 				if (wc->onhook) {
 					wc->onhook = 0;
 					zt_hooksig(&wc->chan, ZT_RXSIG_OFFHOOK);
 					if (debug)
-						printk("Signalled Off Hook\n");
+						printk("wcfxo: Signalled Off Hook\n");
 				}
 #else
 				zt_hooksig(&wc->chan, ZT_RXSIG_OFFHOOK);
@@ -619,7 +619,7 @@
 		printk("wcfxo: Can't set tx state to %d\n", txsig);
 	}
 	if (debug)
-		printk("Setting hook state to %d (%02x)\n", txsig, reg);
+		printk("wcfxo: Setting hook state to %d (%02x)\n", txsig, reg);
 	return 0;
 }
 

-- 
+------------------------------------------------------------------+
| James   W.   Laferriere | System    Techniques | Give me VMS     |
| Network        Engineer | 3542 Broken Yoke Dr. |  Give me Linux  |
| babydr at baby-dragons.com | Billings , MT. 59105 |   only  on  AXP |
+------------------------------------------------------------------+



More information about the asterisk-dev mailing list