[svn-commits] trunk r32207 - /trunk/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Jun 5 00:43:40 MST 2006


Author: oej
Date: Mon Jun  5 02:43:40 2006
New Revision: 32207

URL: http://svn.digium.com/view/asterisk?rev=32207&view=rev
Log:
Issue 7208 - Handle ; in userinfo part of URI too

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=32207&r1=32206&r2=32207&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jun  5 02:43:40 2006
@@ -7142,16 +7142,16 @@
 			return -1;
 		}
 		from += 4;
-		from = strsep(&from, ";");
 		if ((a = strchr(from, '@')))
 			*a++ = '\0';
 		else
 			a = from;	/* just a domain */
+		from = strsep(&from, ";");	/* Remove userinfo options */
+		a = strsep(&a, ";");		/* Remove URI options */
 		ast_string_field_set(p, fromdomain, a);
 	}
 
 	/* Skip any options and find the domain */
-	uri = strsep(&uri, ";");
 
 	/* Get the target domain */
 	if ((a = strchr(uri, '@'))) {
@@ -7163,6 +7163,9 @@
 	colon = strchr(a, ':'); /* Remove :port */
 	if (colon)
 		*colon = '\0';
+
+	uri = strsep(&uri, ";");	/* Remove userinfo options */
+	a = strsep(&a, ";");		/* Remove URI options */
 
 	ast_string_field_set(p, domain, a);
 



More information about the svn-commits mailing list