[Freeswitch-svn] [commit] r9016 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Mon Jul 14 12:32:56 EDT 2008


Author: anthm
Date: Mon Jul 14 12:32:56 2008
New Revision: 9016

Modified:
   freeswitch/trunk/src/switch_core.c
   freeswitch/trunk/src/switch_utils.c

Log:
fix MODAPP-113

Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Mon Jul 14 12:32:56 2008
@@ -700,6 +700,8 @@
 	switch_mutex_lock(runtime.global_mutex);
 	switch_inet_pton(AF_INET, ip_str, &ip);
 
+	ip = htonl(ip);
+
 	if ((list = switch_core_hash_find(IP_LIST.hash, list_name))) {
 		ok = switch_network_list_validate_ip(list, ip);
 	} else if (strchr(list_name, '/')) {

Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c	(original)
+++ freeswitch/trunk/src/switch_utils.c	Mon Jul 14 12:32:56 2008
@@ -169,7 +169,10 @@
 
 	bits = atoi(bit_str);
 	switch_inet_pton(AF_INET, host, ip);
-	*mask = 0xFFFFFFFF & ~(0xFFFFFFFF << bits);
+	*ip = htonl(*ip);
+
+	*mask = 0xFFFFFFFF & ~(0xFFFFFFFF >> bits);
+
 	*bitp = bits;
 
 	return 0;



More information about the Freeswitch-svn mailing list