Skip to content
Snippets Groups Projects
Commit 6345a74c authored by Mark Spencer's avatar Mark Spencer
Browse files

Make sure 10 byte read is considered EOF not error (bug #3505)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 662356e3
No related branches found
No related tags found
No related merge requests found
...@@ -134,7 +134,7 @@ static struct ast_frame *g729_read(struct ast_filestream *s, int *whennext) ...@@ -134,7 +134,7 @@ static struct ast_frame *g729_read(struct ast_filestream *s, int *whennext)
s->fr.mallocd = 0; s->fr.mallocd = 0;
s->fr.data = s->g729; s->fr.data = s->g729;
if ((res = read(s->fd, s->g729, 20)) != 20) { 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)); ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
return NULL; return NULL;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment