]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
add error number output to ioctl failure messages to help with debugging
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 9 Jan 2008 15:26:23 +0000 (15:26 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 9 Jan 2008 15:26:23 +0000 (15:26 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97410 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 46334780a49d071d538ea365dbf94f2c524f6a26..66b9b0468f9658d530aa08216b661140984e39b8 100644 (file)
@@ -1429,12 +1429,12 @@ static void zt_enable_ec(struct zt_pvt *p)
                        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)