[Asterisk-cvs] asterisk/channels chan_sip.c,1.877,1.878

kpfleming kpfleming
Tue Oct 4 20:09:26 CDT 2005


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

Modified Files:
	chan_sip.c 
Log Message:
remove unused config option (issue #5358)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.877
retrieving revision 1.878
diff -u -d -r1.877 -r1.878
--- chan_sip.c	4 Oct 2005 23:54:04 -0000	1.877
+++ chan_sip.c	5 Oct 2005 00:05:13 -0000	1.878
@@ -757,7 +757,6 @@
 	ast_group_t pickupgroup;	/* Pickup group */
 	struct ast_dnsmgr_entry *dnsmgr;/* DNS refresh manager for peer */
 	struct sockaddr_in addr;	/* IP address of peer */
-	struct in_addr mask;
 
 	/* Qualification */
 	struct sip_pvt *call;		/* Call pointer */
@@ -7345,8 +7344,8 @@
 	regex_t regexbuf;
 	int havepattern = 0;
 
-#define FORMAT2 "%-25.25s  %-15.15s %-3.3s %-3.3s %-3.3s %-15.15s  %-8s %-10s\n"
-#define FORMAT  "%-25.25s  %-15.15s %-3.3s %-3.3s %-3.3s %-15.15s  %-8d %-10s\n"
+#define FORMAT2 "%-25.25s  %-15.15s %-3.3s %-3.3s %-3.3s %-8s %-10s\n"
+#define FORMAT  "%-25.25s  %-15.15s %-3.3s %-3.3s %-3.3s %-8d %-10s\n"
 
 	char name[256];
 	char iabuf[INET_ADDRSTRLEN];
@@ -7377,11 +7376,10 @@
 	}
 
 	if (!s) { /* Normal list */
-		ast_cli(fd, FORMAT2, "Name/username", "Host", "Dyn", "Nat", "ACL", "Mask", "Port", "Status");
+		ast_cli(fd, FORMAT2, "Name/username", "Host", "Dyn", "Nat", "ACL", "Port", "Status");
 	} 
 	
 	ASTOBJ_CONTAINER_TRAVERSE(&peerl, 1, do {
-		char nm[20] = "";
 		char status[20] = "";
 		char srch[2000];
 		char pstatus;
@@ -7393,7 +7391,6 @@
 			continue;
 		}
 
-		ast_inet_ntoa(nm, sizeof(nm), iterator->mask);
 		if (!ast_strlen_zero(iterator->username) && !s)
 			snprintf(name, sizeof(name), "%s/%s", iterator->name, iterator->username);
 		else
@@ -7420,7 +7417,7 @@
 			ast_test_flag(iterator, SIP_DYNAMIC) ? " D " : "   ", 	/* Dynamic or not? */
 			(ast_test_flag(iterator, SIP_NAT) & SIP_NAT_ROUTE) ? " N " : "   ",	/* NAT=yes? */
 			iterator->ha ? " A " : "   ", 	/* permit/deny */
-			nm, ntohs(iterator->addr.sin_port), status);
+			ntohs(iterator->addr.sin_port), status);
 
 		if (!s)  {/* Normal CLI list */
 			ast_cli(fd, FORMAT, name, 
@@ -7428,7 +7425,7 @@
 			ast_test_flag(iterator, SIP_DYNAMIC) ? " D " : "   ",  /* Dynamic or not? */
 			(ast_test_flag(iterator, SIP_NAT) & SIP_NAT_ROUTE) ? " N " : "   ",	/* NAT=yes? */
 			iterator->ha ? " A " : "   ",       /* permit/deny */
-			nm,
+			
 			ntohs(iterator->addr.sin_port), status);
 		} else {	/* Manager format */
 			/* The names here need to be the same as other channels */
@@ -11788,7 +11785,6 @@
 {
 	struct sip_peer *peer = NULL;
 	struct ast_ha *oldha = NULL;
-	int maskfound=0;
 	int obproxyfound=0;
 	int found=0;
 	int format=0;		/* Ama flags */
@@ -11933,8 +11929,6 @@
 				else
 					ast_copy_string(peer->tohost, v->value, sizeof(peer->tohost));
 			}
-			if (!maskfound)
-				inet_aton("255.255.255.255", &peer->mask);
 		} else if (!strcasecmp(v->name, "defaultip")) {
 			if (ast_get_ip(&peer->defaddr, v->value)) {
 				ASTOBJ_UNREF(peer, sip_destroy_peer);
@@ -11942,9 +11936,6 @@
 			}
 		} else if (!strcasecmp(v->name, "permit") || !strcasecmp(v->name, "deny")) {
 			peer->ha = ast_append_ha(v->name, v->value, peer->ha);
-		} else if (!strcasecmp(v->name, "mask")) {
-			maskfound++;
-			inet_aton(v->value, &peer->mask);
 		} else if (!strcasecmp(v->name, "port")) {
 			if (!realtime && ast_test_flag(peer, SIP_DYNAMIC))
 				peer->defaddr.sin_port = htons(atoi(v->value));




More information about the svn-commits mailing list