[asterisk-commits] qwell: trunk r100379 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 25 15:26:27 CST 2008


Author: qwell
Date: Fri Jan 25 15:26:27 2008
New Revision: 100379

URL: http://svn.digium.com/view/asterisk?view=rev&rev=100379
Log:
Merged revisions 100378 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100378 | qwell | 2008-01-25 15:24:49 -0600 (Fri, 25 Jan 2008) | 2 lines

This would have never been true, since we're passing (sizeof(req.data) - 1) as the len to recvfrom().

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

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

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=100379&r1=100378&r2=100379
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jan 25 15:26:27 2008
@@ -17778,11 +17778,10 @@
 			ast_log(LOG_WARNING, "Recv error: %s\n", strerror(errno));
 		return 1;
 	}
-	if (res == sizeof(req.data)) {
+	if (res == sizeof(req.data) - 1)
 		ast_debug(1, "Received packet exceeds buffer. Data is possibly lost\n");
-		req.data[sizeof(req.data) - 1] = '\0';
-	} else
-		req.data[res] = '\0';
+
+	req.data[res] = '\0';
 	req.len = res;
 
 	req.socket.fd 	= sipsock;




More information about the asterisk-commits mailing list