From: Russell Bryant Date: Mon, 7 Feb 2005 04:29:19 +0000 (+0000) Subject: Make sure 10 byte read is considered EOF not error (bug #3505) X-Git-Tag: 1.0.11.1~230 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e1d3683fa6181d85ab1a63b04940d5f1c52cb62;p=thirdparty%2Fasterisk.git Make sure 10 byte read is considered EOF not error (bug #3505) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4978 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/formats/format_g729.c b/formats/format_g729.c index 746874d7df..55b5fcbb9e 100755 --- a/formats/format_g729.c +++ b/formats/format_g729.c @@ -130,7 +130,7 @@ static struct ast_frame *g729_read(struct ast_filestream *s, int *whennext) s->fr.mallocd = 0; s->fr.data = s->g729; if ((res = read(s->fd, s->g729, 20)) != 20) { - if (res) + if (res && (res != 10)) ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno)); return NULL; }