From 7b55348360dcd879ee53c93cc983ed1d0224a604 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 30 Jul 2016 22:44:41 +0100 Subject: [PATCH] still on jenkins --- .../Grid/LocalGridServiceConnector.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 70dc7a3182..22e3ecc538 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs @@ -148,12 +148,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return; scene.RegisterModuleInterface(this); - - GridRegion r = new GridRegion(scene.RegionInfo); - - m_RegionInfoCache.CacheLocal(r); - - scene.EventManager.OnRegionUp += OnRegionUp; } public void RemoveRegion(Scene scene) @@ -167,6 +161,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid public void RegionLoaded(Scene scene) { + if (!m_Enabled) + return; + + GridRegion r = new GridRegion(scene.RegionInfo); + + // tests seem not to init this correctly, so brute force + if( m_RegionInfoCache == null) + m_RegionInfoCache = new RegionInfoCache(); + + m_RegionInfoCache.CacheLocal(r); + + scene.EventManager.OnRegionUp += OnRegionUp; } #endregion