Display error when having trouble reading from /dev/phone
authorMark Spencer <markster@digium.com>
Sat, 12 Jun 2004 16:48:12 +0000 (16:48 +0000)
committerMark Spencer <markster@digium.com>
Sat, 12 Jun 2004 16:48:12 +0000 (16:48 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3196 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_phone.c

index 8b2261c..f699ee0 100755 (executable)
@@ -708,7 +708,7 @@ static void phone_mini_packet(struct phone_pvt *i)
        /* Ignore stuff we read... */
        res = read(i->fd, buf, sizeof(buf));
        if (res < 1) {
        /* Ignore stuff we read... */
        res = read(i->fd, buf, sizeof(buf));
        if (res < 1) {
-               ast_log(LOG_WARNING, "Read returned %d\n", res);
+               ast_log(LOG_WARNING, "Read returned %d: %s\n", res, strerror(errno));
                return;
        }
 }
                return;
        }
 }