[Asterisk-cvs] asterisk/channels chan_sip.c,1.255,1.256

markster at lists.digium.com markster at lists.digium.com
Thu Nov 27 12:00:39 CST 2003


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv25914/channels

Modified Files:
	chan_sip.c 
Log Message:
Build contact, don't copy it


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -d -r1.255 -r1.256
--- chan_sip.c	26 Nov 2003 22:00:07 -0000	1.255
+++ chan_sip.c	27 Nov 2003 18:27:02 -0000	1.256
@@ -5057,7 +5057,8 @@
 				ast_queue_frame(p->owner, &af, 0);
 		} else if (sipdebug)
 			ast_verbose("Ignoring this request\n");
-		strncpy(p->our_contact, get_header(req, "Contact"), sizeof(p->our_contact) - 1);
+		if (!strlen(p->our_contact))
+			build_contact(p);
 		if (!p->lastinvite) {
 			/* Handle authentication if this is our first invite */
 			res = check_user(p, req, cmd, e, 1, sin);
@@ -5276,8 +5277,9 @@
 			check_via(p, req);
 		} else if (sipdebug)
 			ast_verbose("Ignoring this request\n");
-			
-		strncpy(p->our_contact, get_header(req, "Contact"), sizeof(p->our_contact) - 1);
+		
+		if (!strlen(p->our_contact))
+			build_contact(p);
 		if (!p->lastinvite) {
 			/* Handle authentication if this is our first subscribe */
 			res = check_user(p, req, cmd, e, 0, sin);




More information about the svn-commits mailing list