[Freeswitch-svn] [commit] r7987 - in freeswitch/trunk/src/mod: endpoints/mod_sofia event_handlers/mod_event_socket

Freeswitch SVN mikej at freeswitch.org
Mon Mar 31 12:05:32 EDT 2008


Author: mikej
Date: Mon Mar 31 12:05:32 2008
New Revision: 7987

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
   freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c

Log:
use the same type to avoid overflow (could we even cause this?)

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Mon Mar 31 12:05:32 2008
@@ -2491,7 +2491,7 @@
 	get_addr(network_ip, sizeof(network_ip), &((struct sockaddr_in *) my_addrinfo->ai_addr)->sin_addr);
 
 	if (profile->acl_count) {
-		int x = 0;
+		uint32_t x = 0;
 		for (x = 0 ; x < profile->acl_count; x++) {
 			if (!switch_check_network_list_ip(network_ip, profile->acl[x])) {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "IP %s Rejected by acl %s\n", network_ip,  profile->acl[x]);

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Mon Mar 31 12:05:32 2008
@@ -659,7 +659,7 @@
 	su_addrinfo_t *my_addrinfo = msg_addrinfo(nua_current_request(nua));
 	
 	if (profile->reg_acl_count) {
-		int x = 0;
+		uint32_t x = 0;
 
 		get_addr(network_ip, sizeof(network_ip), &((struct sockaddr_in *) my_addrinfo->ai_addr)->sin_addr);
 		

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	Mon Mar 31 12:05:32 2008
@@ -1067,7 +1067,7 @@
 	switch_assert(listener != NULL);
 
 	if (prefs.acl_count && listener->sa && !switch_strlen_zero(listener->remote_ip)) {
-		int x = 0;
+		uint32_t x = 0;
 		
 		for (x = 0 ; x < prefs.acl_count; x++) {
 			if (!switch_check_network_list_ip(listener->remote_ip, prefs.acl[x])) {
@@ -1298,7 +1298,7 @@
 	switch_sockaddr_t *sa;
 	switch_socket_t *inbound_socket = NULL;
 	listener_t *listener;
-	int x = 0;
+	uint32_t x = 0;
 
 	memset(&listen_list, 0, sizeof(listen_list));
 	config();



More information about the Freeswitch-svn mailing list