[asterisk-commits] mmichelson: trunk r151512 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 22 10:08:25 CDT 2008


Author: mmichelson
Date: Wed Oct 22 10:08:25 2008
New Revision: 151512

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151512
Log:
The logic of a strncasecmp call was reversed.

(closes issue #13706)
Reported by: andrew53
Patches:
      sip_notify_from_rfc3265.patch uploaded by andrew53 (license 519)


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=151512&r1=151511&r2=151512
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Oct 22 10:08:25 2008
@@ -9419,7 +9419,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