mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 22:08:33 +00:00
fix possible bad pointer in global vars (please test)
This commit is contained in:
1 parent
89c5f3bf82
commit
4ae8282e6c
26 files changed
+185
-100
No files matched your search
@@ -2642,7 +2642,7 @@ static int config(void)
|
||||
} else if (!strcmp(var, "debug")) {
|
||||
globals.debug = atoi(val);
|
||||
} else if (!strcmp(var, "nat-map")) {
|
||||
if (switch_true(val) && switch_core_get_variable("nat_type")) {
|
||||
if (switch_true(val) && switch_nat_get_type()) {
|
||||
prefs.nat_map = 1;
|
||||
}
|
||||
} else if (!strcmp(var, "listen-port")) {
|
||||
@@ -2795,7 +2795,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime)
|
||||
|
||||
close_socket(&listen_list.sock);
|
||||
|
||||
if (prefs.nat_map && switch_core_get_variable("nat_type")) {
|
||||
if (prefs.nat_map && switch_nat_get_type()) {
|
||||
switch_nat_del_mapping(prefs.port, SWITCH_NAT_TCP);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user