]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
make the uri parameter used in reply digests more standards compliant in
authorMatthew Nicholson <mnicholson@digium.com>
Thu, 7 Jul 2011 15:25:49 +0000 (15:25 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Thu, 7 Jul 2011 15:25:49 +0000 (15:25 +0000)
certain cases by prepending "sip:" or "sips:" to it

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

channels/chan_sip.c

index d273e0913d7de34e217db32d02fadc8cdbec6f17..ff0d18d2a7fa8f487f11fd41606ce022e72aeb85 100644 (file)
@@ -18635,7 +18635,7 @@ static int build_reply_digest(struct sip_pvt *p, int method, char* digest, int d
        struct sip_auth_container *credentials;
 
        if (!ast_strlen_zero(p->domain))
-               ast_copy_string(uri, p->domain, sizeof(uri));
+               snprintf(uri, sizeof(uri), "%s:%s", p->socket.type == SIP_TRANSPORT_TLS ? "sips" : "sip", p->domain);
        else if (!ast_strlen_zero(p->uri))
                ast_copy_string(uri, p->uri, sizeof(uri));
        else