[svn-commits] sruffell: linux/trunk r6625 - /linux/trunk/drivers/dahdi/voicebus/GpakCust.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 15 16:40:19 CDT 2009


Author: sruffell
Date: Fri May 15 16:40:15 2009
New Revision: 6625

URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6625
Log:
voicebus:  Make the enable/disable echocan messages debug again.

I accidentally changed to print everytime.  They should only be printed if
DEBUG_ECHOCAN is specified in the debug module parameter.

Modified:
    linux/trunk/drivers/dahdi/voicebus/GpakCust.c

Modified: linux/trunk/drivers/dahdi/voicebus/GpakCust.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/trunk/drivers/dahdi/voicebus/GpakCust.c?view=diff&rev=6625&r1=6624&r2=6625
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/GpakCust.c (original)
+++ linux/trunk/drivers/dahdi/voicebus/GpakCust.c Fri May 15 16:40:15 2009
@@ -225,9 +225,12 @@
 	} else {
 		control = EnableMuLawSwCompanding;
 	}
-	printk(KERN_DEBUG "Enabling ecan on channel: %d (%s)\n", channel,
-			((control == EnableMuLawSwCompanding) ?
-			"MuLaw" : "ALaw"));
+	if (vpm->options.debug | DEBUG_ECHOCAN) {
+		const char *law;
+		law = (control == EnableMuLawSwCompanding) ? "MuLaw" : "ALaw";
+		printk(KERN_DEBUG "Enabling ecan on channel: %d (%s)\n",
+				channel, law);
+	}
 	res = gpakAlgControl(vpm->dspid, channel, control, &pstatus);
 	if (res) {
 		printk(KERN_WARNING "Unable to set SW Companding on " \
@@ -242,7 +245,9 @@
 	int res;
 	GPAK_AlgControlStat_t pstatus;
 
-	printk(KERN_DEBUG "Disabling ecan on channel: %d\n", channel);
+	if (vpm->options.debug | DEBUG_ECHOCAN)
+		printk(KERN_DEBUG "Disabling ecan on channel: %d\n", channel);
+
 	res = gpakAlgControl(vpm->dspid, channel, BypassSwCompanding, &pstatus);
 	if (res) {
 		printk(KERN_WARNING "Unable to disable sw companding on " \




More information about the svn-commits mailing list