diff --git a/src/switch_core.c b/src/switch_core.c index 045695de2f..19d9257fd6 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -1128,8 +1128,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc runtime.flags = flags; runtime.sps_total = 30; - - switch_find_local_ip(guess_ip, sizeof(guess_ip), AF_INET); switch_core_set_variable("local_ip_v4", guess_ip); switch_find_local_ip(guess_ip, sizeof(guess_ip), AF_INET6); @@ -1139,6 +1137,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc switch_event_init(runtime.memory_pool); + switch_nat_init(runtime.memory_pool); + if (switch_xml_init(runtime.memory_pool, err) != SWITCH_STATUS_SUCCESS) { apr_terminate(); return SWITCH_STATUS_MEMERR; @@ -1161,7 +1161,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc switch_scheduler_task_thread_start(); switch_rtp_init(runtime.memory_pool); - switch_nat_init(runtime.memory_pool); runtime.running = 1;