[asterisk-commits] russell: branch 1.6.1 r155517 - in /branches/1.6.1: ./ channels/ include/aste...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 8 15:48:24 CST 2008


Author: russell
Date: Sat Nov  8 15:48:23 2008
New Revision: 155517

URL: http://svn.digium.com/view/asterisk?view=rev&rev=155517
Log:
Merged revisions 155516 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r155516 | russell | 2008-11-08 15:46:43 -0600 (Sat, 08 Nov 2008) | 3 lines

 - Check for failure when putting the packet in the ast_str
 - fix a spelling error in a header file

........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_sip.c
    branches/1.6.1/include/asterisk/strings.h

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=155517&r1=155516&r2=155517
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Sat Nov  8 15:48:23 2008
@@ -19267,10 +19267,16 @@
 			ast_log(LOG_WARNING, "Recv error: %s\n", strerror(errno));
 		return 1;
 	}
+
 	readbuf[res] = '\0';
-	if (!(req.data = ast_str_create(SIP_MIN_PACKET)))
+
+	if (!(req.data = ast_str_create(SIP_MIN_PACKET))) {
 		return 1;
-	ast_str_set(&req.data, 0, "%s", readbuf);
+	}
+
+	if (ast_str_set(&req.data, 0, "%s", readbuf) == AST_DYNSTR_BUILD_FAILED) {
+		return -1;
+	}
 
 	req.socket.fd 	= sipsock;
 	req.socket.type = SIP_TRANSPORT_UDP;

Modified: branches/1.6.1/include/asterisk/strings.h
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/include/asterisk/strings.h?view=diff&rev=155517&r1=155516&r2=155517
==============================================================================
--- branches/1.6.1/include/asterisk/strings.h (original)
+++ branches/1.6.1/include/asterisk/strings.h Sat Nov  8 15:48:23 2008
@@ -548,7 +548,7 @@
  * interface simplified).
  */
 enum {
-	/*! An error has occured and the contents of the dynamic string
+	/*! An error has occurred and the contents of the dynamic string
 	 *  are undefined */
 	AST_DYNSTR_BUILD_FAILED = -1,
 	/*! The buffer size for the dynamic string had to be increased, and




More information about the asterisk-commits mailing list