[Asterisk-cvs] asterisk/channels chan_sip.c,1.762,1.763

markster at lists.digium.com markster at lists.digium.com
Sat Jun 18 14:52:09 CDT 2005


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

Modified Files:
	chan_sip.c 
Log Message:
Fix via comparison to be case insensitive


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.762
retrieving revision 1.763
diff -u -d -r1.762 -r1.763
--- chan_sip.c	17 Jun 2005 15:03:56 -0000	1.762
+++ chan_sip.c	18 Jun 2005 18:53:16 -0000	1.763
@@ -5925,13 +5925,13 @@
 	if (c) {
 		*c = '\0';
 		c = ast_skip_blanks(c+1);
-		if (strcmp(via, "SIP/2.0/UDP")) {
+		if (strcasecmp(via, "SIP/2.0/UDP")) {
 			ast_log(LOG_WARNING, "Don't know how to respond via '%s'\n", via);
 			return -1;
 		}
 		pt = strchr(c, ':');
 		if (pt)
-			*pt++ = '\0';	/* remeber port pointer */
+			*pt++ = '\0';	/* remember port pointer */
 		hp = ast_gethostbyname(c, &ahp);
 		if (!hp) {
 			ast_log(LOG_WARNING, "'%s' is not a valid host\n", c);
@@ -5942,7 +5942,7 @@
 		memcpy(&p->sa.sin_addr, hp->h_addr, sizeof(p->sa.sin_addr));
 		p->sa.sin_port = htons(pt ? atoi(pt) : DEFAULT_SIP_PORT);
 		c = strstr(via, ";rport");
-		if (c && (c[6] != '='))	/* XXX some special hack ? */
+		if (c && (c[6] != '='))	/* rport query, not answer */
 			ast_set_flag(p, SIP_NAT_ROUTE);
 		if (sip_debug_test_pvt(p)) {
 			c = (ast_test_flag(p, SIP_NAT) & SIP_NAT_ROUTE) ? "NAT" : "non-NAT";




More information about the svn-commits mailing list