[asterisk-commits] mmichelson: trunk r253872 - /trunk/main/asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 22 15:32:19 CDT 2010
Author: mmichelson
Date: Mon Mar 22 15:32:15 2010
New Revision: 253872
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=253872
Log:
Initialize channels prior to loading "preload" modules.
We can have bad results when a module, upon being loaded, attempts
to reference the channels container if the container hasn't yet
been initialized. I saw this happen by trying to preload pbx_config.so
and having a hint defined which referenced a non-existent SIP peer.
Modified:
trunk/main/asterisk.c
Modified: trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/asterisk.c?view=diff&rev=253872&r1=253871&r2=253872
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Mon Mar 22 15:32:15 2010
@@ -3603,6 +3603,8 @@
ast_xmldoc_load_documentation();
#endif
+ ast_channels_init();
+
if ((moduleresult = load_modules(1))) { /* Load modules, pre-load only */
printf("%s", term_quit());
exit(moduleresult == -2 ? 2 : 1);
@@ -3614,8 +3616,6 @@
}
ast_http_init(); /* Start the HTTP server, if needed */
-
- ast_channels_init();
if (init_manager()) {
printf("%s", term_quit());
More information about the asterisk-commits
mailing list