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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 21 13:13:40 CDT 2010


Author: dvossel
Date: Wed Apr 21 13:13:36 2010
New Revision: 258305

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=258305
Log:
fixes issue with double "sip:" in header field

This is a clear mistake in logic.  Future discussions
about how to avoid having to handle uri's like this
should take place in the future, but this fix needs
to go in for now.

(closes issue #15847)
Reported by: ebroad
Patches:
      doublesip.patch uploaded by ebroad (license 878)

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=258305&r1=258304&r2=258305
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Apr 21 13:13:36 2010
@@ -10518,7 +10518,7 @@
  	} else {
  		if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
  			/* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
-			snprintf(to, sizeof(to), "<%s%s>;tag=%s", (!strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
+			snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
  		} else if (p->options && p->options->vxml_url) {
  			/* If there is a VXML URL append it to the SIP URL */
  			snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url);




More information about the asterisk-commits mailing list