From 2a98f0639b51dd6c1a9b1784b546d930b79031cd Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 31 Mar 2008 16:05:32 +0000 Subject: [PATCH] use the same type to avoid overflow (could we even cause this?) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7987 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 2 +- src/mod/endpoints/mod_sofia/sofia_reg.c | 2 +- src/mod/event_handlers/mod_event_socket/mod_event_socket.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 6911923b3d..ba2234f87f 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2491,7 +2491,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ 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]); diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 3c40b38dde..2e22a31788 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -659,7 +659,7 @@ void sofia_reg_handle_sip_i_register(nua_t * nua, sofia_profile_t *profile, nua_ 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); diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index b5591af788..9383cf0096 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -1067,7 +1067,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t * thread, void *obj 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_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime) 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();