diff options
author | Diva Canto | 2013-02-28 14:20:07 -0800 |
---|---|---|
committer | Diva Canto | 2013-02-28 14:20:07 -0800 |
commit | ea3e0ef8a362a103fd70f17cfc3ea76a20fac5ab (patch) | |
tree | 27dc3f6d976f1e6ae5b12980995bfe5c36c61399 /OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |
parent | Robust.HG.ini.example updated to get an [Hypergrid] section too. (diff) | |
download | opensim-SC-ea3e0ef8a362a103fd70f17cfc3ea76a20fac5ab.zip opensim-SC-ea3e0ef8a362a103fd70f17cfc3ea76a20fac5ab.tar.gz opensim-SC-ea3e0ef8a362a103fd70f17cfc3ea76a20fac5ab.tar.bz2 opensim-SC-ea3e0ef8a362a103fd70f17cfc3ea76a20fac5ab.tar.xz |
Bug fix in DataSnapshot, where a var was being used before being initialized.
Diffstat (limited to 'OpenSim/Region/DataSnapshot/DataSnapshotManager.cs')
-rw-r--r-- | OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 34 |
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) |