[asterisk-commits] russell: trunk r84237 - in /trunk: ./ res/res_agi.c

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


Author: russell
Date: Mon Oct  1 14:58:29 2007
New Revision: 84237

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

........

Modified:
    trunk/   (props changed)
    trunk/res/res_agi.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?view=diff&rev=84237&r1=84236&r2=84237
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Mon Oct  1 14:58:29 2007
@@ -1926,6 +1926,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