From 6345a74c22ebff7950ed570a9f3d75c2103229c2 Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Fri, 4 Feb 2005 15:46:01 +0000
Subject: [PATCH] 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
---
 formats/format_g729.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/formats/format_g729.c b/formats/format_g729.c
index 28acc92a93..5e79c00e1e 100755
--- a/formats/format_g729.c
+++ b/formats/format_g729.c
@@ -134,7 +134,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;
 	}
-- 
GitLab