Fix chan_phone error code (bug #3692)
authorMark Spencer <markster@digium.com>
Wed, 2 Mar 2005 05:42:38 +0000 (05:42 +0000)
committerMark Spencer <markster@digium.com>
Wed, 2 Mar 2005 05:42:38 +0000 (05:42 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5116 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_phone.c

index a2a0c46..3493a4a 100755 (executable)
@@ -530,7 +530,8 @@ static int phone_write_buf(struct phone_pvt *p, char *buf, int len, int frlen)
 static int phone_send_text(struct ast_channel *ast, char *text)
 {
     int length = strlen(text);
-    return phone_write_buf(ast->pvt->pvt, text, length, length);
+    return phone_write_buf(ast->pvt->pvt, text, length, length) == 
+           length ? 0 : -1;
 }
 
 static int phone_write(struct ast_channel *ast, struct ast_frame *frame)