[Freeswitch-trunk] [commit] r13656 - freeswitch/trunk/src

FreeSWITCH SVN anthm at freeswitch.org
Fri Jun 5 14:23:38 PDT 2009


Author: anthm
Date: Fri Jun  5 16:23:37 2009
New Revision: 13656

Log:
picky compilers

Modified:
   freeswitch/trunk/src/switch_core.c

Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Fri Jun  5 16:23:37 2009
@@ -870,9 +870,11 @@
 	char guess_mask[16] = "";
 	char *tmp_name;
 	int ip_tmp = 0;
+	struct in_addr in;
 
 	switch_find_local_ip(guess_ip, sizeof(guess_ip), &mask, AF_INET);
-	switch_set_string(guess_mask, inet_ntoa(*(struct in_addr *)&mask));
+	in.s_addr = mask;
+	switch_set_string(guess_mask, inet_ntoa(in));
 	
 	switch_mutex_lock(runtime.global_mutex);
 
@@ -1130,6 +1132,7 @@
 	char guess_ip[256];
 	char *dir_path;
 	int mask = 0;
+	struct in_addr in;
 
 	memset(&runtime, 0, sizeof(runtime));
 
@@ -1191,7 +1194,8 @@
 
 	switch_find_local_ip(guess_ip, sizeof(guess_ip), &mask, AF_INET);
 	switch_core_set_variable("local_ip_v4", guess_ip);
-	switch_core_set_variable("local_mask_v4", inet_ntoa(*(struct in_addr *)&mask));
+	in.s_addr = mask;
+	switch_core_set_variable("local_mask_v4", inet_ntoa(in));
 
 
 	switch_find_local_ip(guess_ip, sizeof(guess_ip), NULL, AF_INET6);



More information about the Freeswitch-trunk mailing list