From 3a953dfc986c70287feb7e08b3ef7bbfc9e02f9e Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 28 Dec 2009 01:56:30 +0000 Subject: This is somewhat major-like..... Change the intialization order of Application plugins so that MainServer.Instance gets assigned before RegionModulesController loads the new style shared modules. This is needed because otherwise no new style shared module could register a HTTP method.... if it breaks, you get to keep both pieces --- .../RegionModulesControllerPlugin.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/ApplicationPlugins/RegionModulesController') diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 6c0c74d..2e883d6 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -65,9 +65,13 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController public void Initialise (OpenSimBase openSim) { - m_log.DebugFormat("[REGIONMODULES]: Initializing..."); m_openSim = openSim; - openSim.ApplicationRegistry.RegisterInterface(this); + } + + public void PostInitialise () + { + m_log.DebugFormat("[REGIONMODULES]: Initializing..."); + m_openSim.ApplicationRegistry.RegisterInterface(this); // Who we are string id = AddinManager.CurrentAddin.Id; @@ -81,9 +85,9 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController // The [Modules] section in the ini file IConfig modulesConfig = - openSim.ConfigSource.Source.Configs["Modules"]; + m_openSim.ConfigSource.Source.Configs["Modules"]; if (modulesConfig == null) - modulesConfig = openSim.ConfigSource.Source.AddConfig("Modules"); + modulesConfig = m_openSim.ConfigSource.Source.AddConfig("Modules"); // Scan modules and load all that aren't disabled foreach (TypeExtensionNode node in @@ -195,7 +199,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController // OK, we're up and running m_sharedInstances.Add(module); - module.Initialise(openSim.ConfigSource.Source); + module.Initialise(m_openSim.ConfigSource.Source); } // Immediately run PostInitialise on shared modules @@ -205,10 +209,6 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController } } - public void PostInitialise () - { - } - #endregion #region IPlugin implementation -- cgit v1.1 From 4e7c449c5a2ac8479ee302513a549ee56132140e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 11 Jan 2010 14:39:15 -0800 Subject: This fixes the problem that region modules (new style) weren't being recognized. --- .../RegionModulesControllerPlugin.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'OpenSim/ApplicationPlugins/RegionModulesController') diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 2e883d6..9d79b3a 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -66,12 +66,8 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController public void Initialise (OpenSimBase openSim) { m_openSim = openSim; - } - - public void PostInitialise () - { - m_log.DebugFormat("[REGIONMODULES]: Initializing..."); m_openSim.ApplicationRegistry.RegisterInterface(this); + m_log.DebugFormat("[REGIONMODULES]: Initializing..."); // Who we are string id = AddinManager.CurrentAddin.Id; @@ -108,7 +104,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController continue; // Split off port, if present - string[] moduleParts = moduleString.Split(new char[] {'/'}, 2); + string[] moduleParts = moduleString.Split(new char[] { '/' }, 2); // Format is [port/][class] string className = moduleParts[0]; if (moduleParts.Length > 1) @@ -138,7 +134,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController continue; // Split off port, if present - string[] moduleParts = moduleString.Split(new char[] {'/'}, 2); + string[] moduleParts = moduleString.Split(new char[] { '/' }, 2); // Format is [port/][class] string className = moduleParts[0]; if (moduleParts.Length > 1) @@ -166,7 +162,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController // foreach (TypeExtensionNode node in m_sharedModules) { - Object[] ctorArgs = new Object[] {(uint)0}; + Object[] ctorArgs = new Object[] { (uint)0 }; // Read the config again string moduleString = @@ -176,7 +172,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController if (moduleString != String.Empty) { // Get the port number from the string - string[] moduleParts = moduleString.Split(new char[] {'/'}, + string[] moduleParts = moduleString.Split(new char[] { '/' }, 2); if (moduleParts.Length > 1) ctorArgs[0] = Convert.ToUInt32(moduleParts[0]); @@ -202,11 +198,19 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController module.Initialise(m_openSim.ConfigSource.Source); } + + } + + public void PostInitialise () + { + m_log.DebugFormat("[REGIONMODULES]: PostInitializing..."); + // Immediately run PostInitialise on shared modules foreach (ISharedRegionModule module in m_sharedInstances) { module.PostInitialise(); } + } #endregion -- cgit v1.1