From a0af83a9c466af5b4c05737b986e5aa681c35d26 Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Mon, 20 Dec 2004 09:35:11 +0000
Subject: [PATCH] Minor ACk fix (bug #2687, again)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_sip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 158e79c25b..99e93ef72b 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4486,14 +4486,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) 
-- 
GitLab