[asterisk-commits] kpfleming: branch 1.4 r97410 - /branches/1.4/channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 9 09:26:24 CST 2008


Author: kpfleming
Date: Wed Jan  9 09:26:23 2008
New Revision: 97410

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97410
Log:
add error number output to ioctl failure messages to help with debugging

Modified:
    branches/1.4/channels/chan_zap.c

Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=97410&r1=97409&r2=97410
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Wed Jan  9 09:26:23 2008
@@ -1429,12 +1429,12 @@
 			x = 1;
 			res = ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &x);
 			if (res)
-				ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d\n", p->channel);
+				ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d (%s)\n", p->channel, strerror(res));
 		}
 		x = p->echocancel;
 		res = ioctl(p->subs[SUB_REAL].zfd, ZT_ECHOCANCEL, &x);
 		if (res) 
-			ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d\n", p->channel);
+			ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d (%s)\n", p->channel, strerror(res));
 		else {
 			p->echocanon = 1;
 			if (option_debug)




More information about the asterisk-commits mailing list