[asterisk-commits] russell: trunk r151906 - in /trunk: ./ main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Oct 25 06:02:11 CDT 2008


Author: russell
Date: Sat Oct 25 06:02:11 2008
New Revision: 151906

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151906
Log:
Merged revisions 151905 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r151905 | russell | 2008-10-25 05:59:02 -0500 (Sat, 25 Oct 2008) | 8 lines

Move AMI initialization to occur after loading modules.  This prevents a
deadlock when someone tries to initiate a module reload from the AMI just
as Asterisk is starting.

(closes issue #13778)
Reported by: hotsblanc
Fix suggested by hotsblanc

........

Modified:
    trunk/   (props changed)
    trunk/main/asterisk.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=151906&r1=151905&r2=151906
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Sat Oct 25 06:02:11 2008
@@ -3342,11 +3342,6 @@
 
 	ast_channels_init();
 
-	if (init_manager()) {
-		printf("%s", term_quit());
-		exit(1);
-	}
-
 	if (ast_cdr_engine_init()) {
 		printf("%s", term_quit());
 		exit(1);
@@ -3394,6 +3389,15 @@
 	}
 
 	if (load_modules(0)) {
+		printf("%s", term_quit());
+		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);
 	}




More information about the asterisk-commits mailing list