summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/asterisk.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 782d69772..7da70c232 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3342,11 +3342,6 @@ 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);
@@ -3398,6 +3393,15 @@ int main(int argc, char *argv[])
exit(1);
}
+ /* 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