[asterisk-commits] dvossel: trunk r265366 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 24 14:42:56 CDT 2010


Author: dvossel
Date: Mon May 24 14:42:54 2010
New Revision: 265366

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=265366
Log:
reverses incorrect logic introduced by r243200

The decoding of the replace_id did not need to be broken
up in this instance.  This was brought to my attention
again because it caused a segfault when the from or to
tags were not present in the "Replaces" header.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=265366&r1=265365&r2=265366
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon May 24 14:42:54 2010
@@ -20336,6 +20336,7 @@
 			ast_debug(3, "INVITE part of call transfer. Replaces [%s]\n", p_replaces);
 		/* Create a buffer we can manipulate */
 		replace_id = ast_strdupa(p_replaces);
+		ast_uri_decode(replace_id);
 
 		if (!p->refer && !sip_refer_allocate(p)) {
 			transmit_response_reliable(p, "500 Server Internal Error", req);
@@ -20367,10 +20368,6 @@
 				fromtag = strsep(&fromtag, "&"); /* trim what ? */
 			}
 		}
-
-		ast_uri_decode(fromtag);
-		ast_uri_decode(totag);
-		ast_uri_decode(replace_id);
 
 		if (sipdebug)
 			ast_debug(4, "Invite/replaces: Will use Replace-Call-ID : %s Fromtag: %s Totag: %s\n",




More information about the asterisk-commits mailing list