diff options
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index c33702144..a756b305b 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3590,6 +3590,11 @@ int main(int argc, char *argv[]) ast_channels_init(); + if (init_manager()) { + printf("%s", term_quit()); + exit(1); + } + if (ast_cdr_engine_init()) { printf("%s", term_quit()); exit(1); @@ -3650,15 +3655,6 @@ int main(int argc, char *argv[]) ast_stun_init(); - /* AMI is initialized after loading modules because of a potential - * conflict between issuing a module reload from manager and - * registering manager actions. This will cause reversed locking - * order between the module list and manager actions list. */ - if (init_manager()) { - printf("%s", term_quit()); - exit(1); - } - dnsmgr_start_refresh(); /* We might have the option of showing a console, but for now just @@ -3674,6 +3670,9 @@ int main(int argc, char *argv[]) sig_alert_pipe[0] = sig_alert_pipe[1] = -1; ast_set_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED); + + ast_process_pending_reloads(); + pthread_sigmask(SIG_UNBLOCK, &sigs, NULL); #ifdef __AST_DEBUG_MALLOC |