]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix missing "sip:" in ACK (bug #2687)
authorRussell Bryant <russell@russellbryant.com>
Tue, 21 Dec 2004 15:10:06 +0000 (15:10 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 21 Dec 2004 15:10:06 +0000 (15:10 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4511 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 68e0923a8b7e77b47b279cdf1ad0c369fd0185a5..9a84a06721ea6a83a5890e8a4fd3ebeb7a6d3651 100755 (executable)
@@ -4384,14 +4384,14 @@ static int parse_ok_contact(struct sip_pvt *pvt, struct sip_request *req)
        snprintf(pvt->our_contact, sizeof(pvt->our_contact) - 1, "<%s>", c);
 
 
+       strncpy(pvt->okcontacturi, c, sizeof(pvt->okcontacturi) - 1);
+       
        /* Make sure it's a SIP URL */
        if (strncasecmp(c, "sip:", 4)) {
                ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip:) trying to use anyway\n", c);
        } else
                c += 4;
 
-       strncpy(pvt->okcontacturi, c, sizeof(pvt->okcontacturi) - 1);
-       
        /* Ditch arguments */
        n = strchr(c, ';');
        if (n)