[svn-commits] mmichelson: trunk r123486 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 17 15:28:48 CDT 2008


Author: mmichelson
Date: Tue Jun 17 15:28:47 2008
New Revision: 123486

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

........
r123485 | mmichelson | 2008-06-17 15:26:38 -0500 (Tue, 17 Jun 2008) | 4 lines

Make chan_sip build under dev mode with compilers >= GCC 4.2
Thanks to jpeeler for alerting me of this


........

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=123486&r1=123485&r2=123486
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jun 17 15:28:47 2008
@@ -16404,8 +16404,10 @@
 	int sipmethod;
 	int res = 1;
 	const char *c = get_header(req, "Cseq");
+	/* GCC 4.2 complains if I try to cast c as a char * when passing it to ast_skip_nonblanks, so make a copy of it */
+	char *c_copy = ast_strdupa(c);
 	/* Skip the Cseq and its subsequent spaces */
-	const char *msg = ast_skip_blanks(ast_skip_nonblanks((char *)c));
+	const char *msg = ast_skip_blanks(ast_skip_nonblanks(c_copy));
 
 	if (!msg)
 		msg = "";




More information about the svn-commits mailing list