diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-01 19:56:28 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-01 19:56:28 +0000 |
commit | 894a29908b919b808a4cffe77bc63db8cc50323b (patch) | |
tree | 6ba7c77d654c630e365f7739c475074aa0f763ae /res | |
parent | 715a5ff805b1c8b7d954193947b4c9ee0f2cd8e9 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@84236 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-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 376089eff..5ea2d69a0 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1884,6 +1884,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)); |