[asterisk-commits] oej: branch oej/codename-pineapple r54814 - /team/oej/codename-pineapple/chan...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 16 05:18:27 MST 2007


Author: oej
Date: Fri Feb 16 06:18:26 2007
New Revision: 54814

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54814
Log:
Update

Modified:
    team/oej/codename-pineapple/channels/sip3/sip3_sdprtp.c

Modified: team/oej/codename-pineapple/channels/sip3/sip3_sdprtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/channels/sip3/sip3_sdprtp.c?view=diff&rev=54814&r1=54813&r2=54814
==============================================================================
--- team/oej/codename-pineapple/channels/sip3/sip3_sdprtp.c (original)
+++ team/oej/codename-pineapple/channels/sip3/sip3_sdprtp.c Fri Feb 16 06:18:26 2007
@@ -883,6 +883,7 @@
 	const char *search;
 	char *boundary;
 	unsigned int x;
+	int boundaryisquoted = FALSE;
 
 	content_type = get_header(req, "Content-Type");
 
@@ -906,10 +907,20 @@
 	if (ast_strlen_zero(search))
 		return FALSE;
 
+	/* If the boundary is quoted with ", remove quote */
+	if (*search == '\"')  {
+		search++;
+		boundaryisquoted = TRUE;
+	}
+
 	/* make a duplicate of the string, with two extra characters
 	   at the beginning */
 	boundary = ast_strdupa(search - 2);
 	boundary[0] = boundary[1] = '-';
+
+	/* Remove final quote */
+	if (boundaryisquoted)
+		boundary[strlen(boundary) - 1] = '\0';
 
 	/* search for the boundary marker, but stop when there are not enough
 	   lines left for it, the Content-Type header and at least one line of



More information about the asterisk-commits mailing list