<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8053">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core: Tweak startup order.<br><br>Move initialization of units which do not require configuration to occur<br>before preload modules.  This leaves only units which load config between<br>module preload and regular load stages.<br><br>Change-Id: I1d15384acad16a22c3498124421af474fa517478<br>---<br>M main/asterisk.c<br>1 file changed, 17 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/53/8053/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/asterisk.c b/main/asterisk.c<br>index 4c7abd6..39c97d2 100644<br>--- a/main/asterisk.c<br>+++ b/main/asterisk.c<br>@@ -4546,20 +4546,7 @@<br>   check_init(ast_device_state_engine_init(), "Device State Engine");<br>  check_init(ast_presence_state_engine_init(), "Presence State Engine");<br>      check_init(ast_dns_system_resolver_init(), "Default DNS resolver");<br>-        check_init(load_modules(1), "Module Preload");<br>-     check_init(ast_features_init(), "Call Features");<br>-  check_init(dnsmgr_init(), "DNS manager");<br>   check_init(ast_security_stasis_init(), "Security Stasis Topic and Events");<br>-        check_init(ast_named_acl_init(), "Named ACL system");<br>-<br>-   ast_http_init();                /* Start the HTTP server, if needed */<br>-<br>-    check_init(ast_indications_init(), "Indication Tone Handling");<br>-    check_init(ast_cdr_engine_init(), "CDR Engine");<br>-<br>-        ast_dsp_init();<br>-      ast_udptl_init();<br>-<br>  check_init(ast_image_init(), "Image");<br>      check_init(ast_file_init(), "Generic File Format Support");<br>         check_init(load_pbx(), "load_pbx");<br>@@ -4570,10 +4557,27 @@<br>        check_init(load_pbx_app(), "PBX Application Support");<br>      check_init(load_pbx_hangup_handler(), "PBX Hangup Handler Support");<br>        check_init(ast_local_init(), "Local Proxy Channel Driver");<br>+<br>+     /* We should avoid most config loads before this point as they can't use realtime. */<br>+    check_init(load_modules(1), "Module Preload");<br>+<br>+  /* Initialize core modules that have config files.  These should be converted to<br>+      * built-in modules with load priority after realtime, that way users will not<br>+        * need to 'preload' realtime modules. */<br>+    check_init(ast_features_init(), "Call Features");<br>+  check_init(dnsmgr_init(), "DNS manager");<br>+  check_init(ast_named_acl_init(), "Named ACL system");<br>+      ast_http_init();<br>+     check_init(ast_indications_init(), "Indication Tone Handling");<br>+    check_init(ast_cdr_engine_init(), "CDR Engine");<br>+   ast_dsp_init();<br>+      ast_udptl_init();<br>     check_init(ast_cel_engine_init(), "CEL Engine");<br>    check_init(init_manager(), "Asterisk Manager Interface");<br>   check_init(ast_enum_init(), "ENUM Support");<br>        check_init(ast_cc_init(), "Call Completion Supplementary Services");<br>+<br>+    /* Load remaining modules */<br>  check_init(load_modules(0), "Module");<br> <br>   /*<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8053">change 8053</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8053"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1d15384acad16a22c3498124421af474fa517478 </div>
<div style="display:none"> Gerrit-Change-Number: 8053 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>