[Freeswitch-trunk] [commit] r13705 - freeswitch/trunk/src/mod/event_handlers/mod_event_socket

FreeSWITCH SVN brian at freeswitch.org
Mon Jun 8 16:28:52 PDT 2009


Author: brian
Date: Mon Jun  8 18:28:51 2009
New Revision: 13705

Log:
 don't print misleading info here either if nat_type isn't set even if the add is a no_op

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c

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 Jun  8 18:28:51 2009
@@ -2213,7 +2213,7 @@
 				} else if (!strcmp(var, "debug")) {
 					globals.debug = atoi(val);
 				} else if (!strcmp(var, "nat-map")) {
-					if (switch_true(val)) {
+					if (switch_true(val) && switch_core_get_variable("nat_type")) {
 						prefs.nat_map = 1;
 					}
 				} else if (!strcmp(var, "listen-port")) {
@@ -2244,7 +2244,7 @@
 		prefs.nat_map = 0;
 	}
 
-	if (prefs.nat_map && switch_check_network_list_ip(prefs.ip, "loopback.auto")) {
+	if (prefs.nat_map) {
 		prefs.nat_map = 0;
 	}
 
@@ -2345,7 +2345,7 @@
 
 	close_socket(&listen_list.sock);
 	
-	if (prefs.nat_map) {
+	if (prefs.nat_map && switch_core_get_variable("nat_type")) {
 		switch_nat_del_mapping(prefs.port, SWITCH_NAT_TCP);
 	}
 



More information about the Freeswitch-trunk mailing list