Updated Branches: refs/heads/master ed71ed406 -> cd6444bb4
TS-1487: Ordering fix, init plugins before cache. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cd6444bb Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cd6444bb Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cd6444bb Branch: refs/heads/master Commit: cd6444bb411ebd0c621540b21bc530b89001b190 Parents: ed71ed4 Author: Alan M. Carroll <[email protected]> Authored: Fri Jul 19 17:45:51 2013 -0500 Committer: Alan M. Carroll <[email protected]> Committed: Fri Jul 19 17:45:51 2013 -0500 ---------------------------------------------------------------------- example/lifecycle-plugin/lifecycle-plugin.c | 2 ++ proxy/Main.cc | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6444bb/example/lifecycle-plugin/lifecycle-plugin.c ---------------------------------------------------------------------- diff --git a/example/lifecycle-plugin/lifecycle-plugin.c b/example/lifecycle-plugin/lifecycle-plugin.c index 45e05c2..1b16a1c 100644 --- a/example/lifecycle-plugin/lifecycle-plugin.c +++ b/example/lifecycle-plugin/lifecycle-plugin.c @@ -105,6 +105,8 @@ TSPluginInit(int argc, const char *argv[]) TSLifecycleHookAdd(TS_LIFECYCLE_PORTS_READY_HOOK, cb); TSLifecycleHookAdd(TS_LIFECYCLE_CACHE_READY_HOOK, cb); + TSDebug("lifecycle-plugin", "online"); + return; Lerror: http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6444bb/proxy/Main.cc ---------------------------------------------------------------------- diff --git a/proxy/Main.cc b/proxy/Main.cc index 10804cd..9c4ad8b 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -1574,6 +1574,10 @@ main(int /* argc ATS_UNUSED */, char **argv) clusterProcessor.init(); #endif + // Plugins can get callbacks for very early events, so initialize even earlier. + plugin_init(system_config_directory); // plugin.config + pmgmt->registerPluginCallbacks(global_config_cbs); + // Load HTTP port data. getNumSSLThreads depends on this. if (!HttpProxyPort::loadValue(http_accept_port_descriptor)) HttpProxyPort::loadConfig(); @@ -1626,9 +1630,6 @@ main(int /* argc ATS_UNUSED */, char **argv) // main server logic initiated here // ////////////////////////////////////// - plugin_init(system_config_directory); // plugin.config - pmgmt->registerPluginCallbacks(global_config_cbs); - transformProcessor.start(); init_HttpProxyServer(num_accept_threads);
