Fix phone crash
authorMark Spencer <markster@digium.com>
Mon, 7 Apr 2003 18:45:53 +0000 (18:45 +0000)
committerMark Spencer <markster@digium.com>
Mon, 7 Apr 2003 18:45:53 +0000 (18:45 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@768 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_phone.c

index b0a5444..9ca5a45 100755 (executable)
@@ -584,6 +584,8 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame)
                        expected=4;
                } else {
                        res = phone_write_buf(p, pos, expected, maxfr);
+                       if (res > 0)
+                               res = 0;
                }
                if (res != expected) {
                        if (errno != EAGAIN) {