aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-11-11 21:15:39 +0000
committerMelanie2012-11-11 21:15:39 +0000
commit1a478f868e70be9b4d85630a93276a32361eccb4 (patch)
treebd433d4acbad73e453191a399ac09163c203df6e /OpenSim
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-1a478f868e70be9b4d85630a93276a32361eccb4.zip
opensim-SC-1a478f868e70be9b4d85630a93276a32361eccb4.tar.gz
opensim-SC-1a478f868e70be9b4d85630a93276a32361eccb4.tar.bz2
opensim-SC-1a478f868e70be9b4d85630a93276a32361eccb4.tar.xz
Prevent datasnapshot from crashing the simulator
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/DataSnapshot/DataSnapshotManager.cs28
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
index 9794549..18aa609 100644
--- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
@@ -72,6 +72,7 @@ namespace OpenSim.Region.DataSnapshot
72 public string m_listener_port = ConfigSettings.DefaultRegionHttpPort.ToString(); 72 public string m_listener_port = ConfigSettings.DefaultRegionHttpPort.ToString();
73 public string m_hostname = "127.0.0.1"; 73 public string m_hostname = "127.0.0.1";
74 private UUID m_Secret = UUID.Random(); 74 private UUID m_Secret = UUID.Random();
75 private bool m_servicesNotified = false;
75 76
76 //Update timers 77 //Update timers
77 private int m_period = 20; // in seconds 78 private int m_period = 20; // in seconds
@@ -179,6 +180,23 @@ namespace OpenSim.Region.DataSnapshot
179 } 180 }
180 } 181 }
181 } 182 }
183
184 // Must be done here because on shared modules, PostInitialise() will run
185 // BEFORE any scenes are registered. There is no "all scenes have been loaded"
186 // kind of callback because scenes may be created dynamically, so we cannot
187 // have that info, ever.
188 if (!m_servicesNotified)
189 {
190 //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer
191 new DataRequestHandler(m_scenes[0], this);
192
193 m_hostname = m_scenes[0].RegionInfo.ExternalHostName;
194
195 if (m_dataServices != "" && m_dataServices != "noservices")
196 NotifyDataServices(m_dataServices, "online");
197
198 m_servicesNotified = true;
199 }
182 } 200 }
183 201
184 public void RemoveRegion(Scene scene) 202 public void RemoveRegion(Scene scene)
@@ -214,16 +232,6 @@ namespace OpenSim.Region.DataSnapshot
214 232
215 public void PostInitialise() 233 public void PostInitialise()
216 { 234 {
217 if (!m_enabled)
218 return;
219
220 //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer
221 new DataRequestHandler(m_scenes[0], this);
222
223 m_hostname = m_scenes[0].RegionInfo.ExternalHostName;
224
225 if (m_dataServices != "" && m_dataServices != "noservices")
226 NotifyDataServices(m_dataServices, "online");
227 } 235 }
228 236
229 public void RegionLoaded(Scene scene) 237 public void RegionLoaded(Scene scene)