summaryrefslogtreecommitdiff
path: root/channels/chan_phone.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-04-07 18:45:53 +0000
committerMark Spencer <markster@digium.com>2003-04-07 18:45:53 +0000
commit736bb7c6dc41bb4a05a92affc8447f483ac847c9 (patch)
tree6e85c905221ba08b5f51d7192473eabb6ef42499 /channels/chan_phone.c
parentc0aac70a7bfa9bd98206e4b49d14f3812e595e8c (diff)
Fix phone crash
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_phone.c')
-rwxr-xr-xchannels/chan_phone.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index b0a54443a..9ca5a452b 100755
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -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) {