aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/DataSnapshot
diff options
context:
space:
mode:
authorUbitUmarov2018-01-22 20:07:59 +0000
committerUbitUmarov2018-01-22 20:07:59 +0000
commitb164925262df48c3582abf6891f42670f156841e (patch)
tree168ca1cae627536244ae141b3cc84f85c9e020db /OpenSim/Region/OptionalModules/DataSnapshot
parentmove datasnapshot notification to when region is actually loaded (diff)
downloadopensim-SC-b164925262df48c3582abf6891f42670f156841e.zip
opensim-SC-b164925262df48c3582abf6891f42670f156841e.tar.gz
opensim-SC-b164925262df48c3582abf6891f42670f156841e.tar.bz2
opensim-SC-b164925262df48c3582abf6891f42670f156841e.tar.xz
Ooops
Diffstat (limited to 'OpenSim/Region/OptionalModules/DataSnapshot')
-rw-r--r--OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs55
1 files changed, 28 insertions, 27 deletions
diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
index ab61be9..1ed403e 100644
--- a/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
@@ -164,32 +164,7 @@ namespace OpenSim.Region.DataSnapshot
164 164
165 m_log.DebugFormat("[DATASNAPSHOT]: Module added to Scene {0}.", scene.RegionInfo.RegionName); 165 m_log.DebugFormat("[DATASNAPSHOT]: Module added to Scene {0}.", scene.RegionInfo.RegionName);
166 166
167
168 m_scenes.Add(scene); 167 m_scenes.Add(scene);
169 m_snapStore.AddScene(scene);
170
171 Assembly currentasm = Assembly.GetExecutingAssembly();
172
173 foreach (Type pluginType in currentasm.GetTypes())
174 {
175 if (pluginType.IsPublic)
176 {
177 if (!pluginType.IsAbstract)
178 {
179 if (pluginType.GetInterface("IDataSnapshotProvider") != null)
180 {
181 IDataSnapshotProvider module = (IDataSnapshotProvider)Activator.CreateInstance(pluginType);
182 module.Initialize(scene, this);
183 module.OnStale += MarkDataStale;
184
185 m_dataproviders.Add(module);
186 m_snapStore.AddProvider(module);
187
188 m_log.Debug("[DATASNAPSHOT]: Added new data provider type: " + pluginType.Name);
189 }
190 }
191 }
192 }
193 168
194 } 169 }
195 170
@@ -233,8 +208,6 @@ namespace OpenSim.Region.DataSnapshot
233 if (!m_enabled) 208 if (!m_enabled)
234 return; 209 return;
235 210
236 m_log.DebugFormat("[DATASNAPSHOT]: Marking scene {0} as stale.", scene.RegionInfo.RegionName);
237 m_snapStore.ForceSceneStale(scene);
238 211
239 if (!m_servicesNotified) 212 if (!m_servicesNotified)
240 { 213 {
@@ -249,6 +222,34 @@ namespace OpenSim.Region.DataSnapshot
249 222
250 m_servicesNotified = true; 223 m_servicesNotified = true;
251 } 224 }
225
226 m_snapStore.AddScene(scene);
227 m_log.DebugFormat("[DATASNAPSHOT]: Marking scene {0} as stale.", scene.RegionInfo.RegionName);
228 m_snapStore.ForceSceneStale(scene);
229
230 Assembly currentasm = Assembly.GetExecutingAssembly();
231
232 foreach (Type pluginType in currentasm.GetTypes())
233 {
234 if (pluginType.IsPublic)
235 {
236 if (!pluginType.IsAbstract)
237 {
238 if (pluginType.GetInterface("IDataSnapshotProvider") != null)
239 {
240 IDataSnapshotProvider module = (IDataSnapshotProvider)Activator.CreateInstance(pluginType);
241 module.Initialize(scene, this);
242 module.OnStale += MarkDataStale;
243
244 m_dataproviders.Add(module);
245 m_snapStore.AddProvider(module);
246
247 m_log.Debug("[DATASNAPSHOT]: Added new data provider type: " + pluginType.Name);
248 }
249 }
250 }
251 }
252
252 } 253 }
253 254
254 public void Close() 255 public void Close()