[asterisk-commits] russell: branch 1.4 r84236 - /branches/1.4/res/res_agi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 1 14:56:28 CDT 2007


Author: russell
Date: Mon Oct  1 14:56:28 2007
New Revision: 84236

URL: http://svn.digium.com/view/asterisk?view=rev&rev=84236
Log:
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)

Modified:
    branches/1.4/res/res_agi.c

Modified: branches/1.4/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_agi.c?view=diff&rev=84236&r1=84235&r2=84236
==============================================================================
--- branches/1.4/res/res_agi.c (original)
+++ branches/1.4/res/res_agi.c Mon Oct  1 14:56:28 2007
@@ -1884,6 +1884,8 @@
 				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));




More information about the asterisk-commits mailing list