From 639c6bdd625c229252efeeadb65b1b37568c3b61 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Tue, 3 Apr 2012 14:50:26 -0400 Subject: [PATCH] Add a delay to let regions load before calling PostInit Something is letting PostInit fire before the regions are loaded. This small delay "fixes" it. Will continue to look for a way to make sure they are loaded first. --- OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | 5 ++++- .../Services/IntegrationService/IntegrationServiceBase.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 45b8d6f4b9..cefaf2ff15 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -135,7 +135,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions } } } - + // Temporary fix for an issue after the mono-addis upgrade + // PostInilise can fire before the region is loaded, so need to + // track down the cause of that + Thread.Sleep(300); m_openSim.ModuleLoader.PostInitialise(); m_openSim.ModuleLoader.ClearCache(); } diff --git a/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs b/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs index e44c01a0df..d1ffc3ec76 100644 --- a/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs +++ b/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs @@ -69,8 +69,10 @@ namespace OpenSim.Services.IntegrationService if (serverConfig == null) throw new Exception(String.Format("No section {0} in config file", m_ConfigName)); + // defaults to the ./bin directory string RegistryLocation = serverConfig.GetString("PluginRegistryLocation", "."); + AddinManager.AddinLoaded += on_addinloaded_; AddinManager.AddinLoadError += on_addinloaderror_; @@ -98,7 +100,8 @@ namespace OpenSim.Services.IntegrationService string gridService = m_IntegrationServerConfig.GetString("GridService", String.Empty); string presenceService = m_IntegrationServerConfig.GetString("PresenceService", String.Empty); - + // These are here now, but will be gone soon. + // Each plugin will load it's own services Object[] args = new Object[] { config }; if (gridService != string.Empty) m_GridService = LoadPlugin(gridService, args);