aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
authorUbitUmarov2016-07-30 23:23:28 +0100
committerUbitUmarov2016-07-30 23:23:28 +0100
commit78d9312fc82c7b4a8342eaa128553b95e59e24f9 (patch)
tree48a889f6b408317d101949abc6053f26b1234161 /OpenSim/Region/CoreModules/ServiceConnectorsOut
parent still on jenkins (diff)
downloadopensim-SC-78d9312fc82c7b4a8342eaa128553b95e59e24f9.zip
opensim-SC-78d9312fc82c7b4a8342eaa128553b95e59e24f9.tar.gz
opensim-SC-78d9312fc82c7b4a8342eaa128553b95e59e24f9.tar.bz2
opensim-SC-78d9312fc82c7b4a8342eaa128553b95e59e24f9.tar.xz
move some code back to AddRegion because some tests dont issue RegionLoaded
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs31
1 files changed, 18 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 22e3ecc..bf211ce 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -60,9 +60,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
60 m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader); 60 m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader);
61 } 61 }
62 62
63 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache) 63 public LocalGridServicesConnector(IConfigSource source)
64 { 64 {
65 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader); 65 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader);
66 InitialiseService(source, null);
67 }
68
69 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache)
70 {
71 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly witj cache.", LogHeader);
66 InitialiseService(source, regionInfoCache); 72 InitialiseService(source, regionInfoCache);
67 } 73 }
68 74
@@ -148,6 +154,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
148 return; 154 return;
149 155
150 scene.RegisterModuleInterface<IGridService>(this); 156 scene.RegisterModuleInterface<IGridService>(this);
157
158
159
160 // tests seem not to init this correctly, so brute force
161 if( m_RegionInfoCache == null)
162 m_RegionInfoCache = new RegionInfoCache();
163
164 GridRegion r = new GridRegion(scene.RegionInfo);
165 m_RegionInfoCache.CacheLocal(r);
166
167 scene.EventManager.OnRegionUp += OnRegionUp;
151 } 168 }
152 169
153 public void RemoveRegion(Scene scene) 170 public void RemoveRegion(Scene scene)
@@ -161,18 +178,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
161 178
162 public void RegionLoaded(Scene scene) 179 public void RegionLoaded(Scene scene)
163 { 180 {
164 if (!m_Enabled)
165 return;
166
167 GridRegion r = new GridRegion(scene.RegionInfo);
168
169 // tests seem not to init this correctly, so brute force
170 if( m_RegionInfoCache == null)
171 m_RegionInfoCache = new RegionInfoCache();
172
173 m_RegionInfoCache.CacheLocal(r);
174
175 scene.EventManager.OnRegionUp += OnRegionUp;
176 } 181 }
177 182
178 #endregion 183 #endregion