Display error when having trouble reading from /dev/phone
[asterisk/asterisk.git] / 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) {
-               ast_log(LOG_WARNING, "Read returned %d\n", res);
+               ast_log(LOG_WARNING, "Read returned %d: %s\n", res, strerror(errno));
                return;
        }
 }