]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 258305 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Wed, 21 Apr 2010 18:19:09 +0000 (18:19 +0000)
committerDavid Vossel <dvossel@digium.com>
Wed, 21 Apr 2010 18:19:09 +0000 (18:19 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r258305 | dvossel | 2010-04-21 13:13:36 -0500 (Wed, 21 Apr 2010) | 12 lines

  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)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@258314 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 84110f1dd6697d4b698781a84731aeed0ec3fc9b..a9e2cf18e23c1e8b62ada7af9225a3b8adfa28d9 100644 (file)
@@ -10767,7 +10767,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
        } 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);