aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/DataSnapshot/DataSnapshotManager.cs')
-rw-r--r--OpenSim/Region/DataSnapshot/DataSnapshotManager.cs34
1 files changed, 15 insertions, 19 deletions
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
index 32017a8..dd48dd5 100644
--- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
@@ -148,8 +148,6 @@ namespace OpenSim.Region.DataSnapshot
148 return; 148 return;
149 } 149 }
150 150
151 if (m_enabled)
152 m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname);
153 } 151 }
154 152
155 } 153 }
@@ -163,8 +161,22 @@ namespace OpenSim.Region.DataSnapshot
163 161
164 m_log.DebugFormat("[DATASNAPSHOT]: Module added to Scene {0}.", scene.RegionInfo.RegionName); 162 m_log.DebugFormat("[DATASNAPSHOT]: Module added to Scene {0}.", scene.RegionInfo.RegionName);
165 163
166 m_snapStore.AddScene(scene); 164 if (!m_servicesNotified)
165 {
166 m_hostname = scene.RegionInfo.ExternalHostName;
167 m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname);
168
169 //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer
170 new DataRequestHandler(scene, this);
171
172 if (m_dataServices != "" && m_dataServices != "noservices")
173 NotifyDataServices(m_dataServices, "online");
174
175 m_servicesNotified = true;
176 }
177
167 m_scenes.Add(scene); 178 m_scenes.Add(scene);
179 m_snapStore.AddScene(scene);
168 180
169 Assembly currentasm = Assembly.GetExecutingAssembly(); 181 Assembly currentasm = Assembly.GetExecutingAssembly();
170 182
@@ -189,22 +201,6 @@ namespace OpenSim.Region.DataSnapshot
189 } 201 }
190 } 202 }
191 203
192 // Must be done here because on shared modules, PostInitialise() will run
193 // BEFORE any scenes are registered. There is no "all scenes have been loaded"
194 // kind of callback because scenes may be created dynamically, so we cannot
195 // have that info, ever.
196 if (!m_servicesNotified)
197 {
198 //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer
199 new DataRequestHandler(m_scenes[0], this);
200
201 m_hostname = m_scenes[0].RegionInfo.ExternalHostName;
202
203 if (m_dataServices != "" && m_dataServices != "noservices")
204 NotifyDataServices(m_dataServices, "online");
205
206 m_servicesNotified = true;
207 }
208 } 204 }
209 205
210 public void RemoveRegion(Scene scene) 206 public void RemoveRegion(Scene scene)