Fix chan_phone error code (bug #3692)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2005-03-02 05:42:38 +00:00
parent a5a45131bb
commit dc297cd02a

View File

@@ -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)