diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-10-01 19:58:29 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-10-01 19:58:29 +0000 |
commit | efaa9cf6076e51a53273f5d2f6589e5f643d315f (patch) | |
tree | fa0dcd5294ea350519190f43e89ee0b193ba9951 | |
parent | 1f3f7215d8a673a0da0c6ed0403785bd589bb24a (diff) |
Merged revisions 84236 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r84236 | russell | 2007-10-01 14:56:28 -0500 (Mon, 01 Oct 2007) | 5 lines
Add another sanity check in the AGI read loop. We really don't care about
EAGAIN unless we didn't read an entire line. If there is a newline at the
end if the read buffer, break, because we got the whole thing.
(reported and patched by bmd)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | res/res_agi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index 9e9261690..aeaeb7dd0 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1926,6 +1926,8 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi if (res != NULL && !agi->fast) break; buflen = strlen(buf); + if (buflen && buf[buflen - 1] == '\n') + break; len -= buflen; if (agidebug) ast_verbose( "AGI Rx << temp buffer %s - errno %s\n", buf, strerror(errno)); |