diff options
author | Diva Canto | 2013-02-28 14:20:07 -0800 |
---|---|---|
committer | Diva Canto | 2013-02-28 14:29:06 -0800 |
commit | 00904a0b5669bd050a0e6644d65eba54aa299465 (patch) | |
tree | 3740f1f3abf4993966a856f1825ee8d75b4f0d2e /OpenSim | |
parent | Replaced Ionic.Zip.dll with a new one that fixes a bug in it. DotNetZip (from... (diff) | |
download | opensim-SC_OLD-00904a0b5669bd050a0e6644d65eba54aa299465.zip opensim-SC_OLD-00904a0b5669bd050a0e6644d65eba54aa299465.tar.gz opensim-SC_OLD-00904a0b5669bd050a0e6644d65eba54aa299465.tar.bz2 opensim-SC_OLD-00904a0b5669bd050a0e6644d65eba54aa299465.tar.xz |
Bug fix in DataSnapshot, where a var was being used before being initialized.
Diffstat (limited to 'OpenSim')
-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 5e62f23..a3cd9c8 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |||
@@ -140,8 +140,6 @@ namespace OpenSim.Region.DataSnapshot | |||
140 | return; | 140 | return; |
141 | } | 141 | } |
142 | 142 | ||
143 | if (m_enabled) | ||
144 | m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); | ||
145 | } | 143 | } |
146 | 144 | ||
147 | } | 145 | } |
@@ -155,8 +153,22 @@ namespace OpenSim.Region.DataSnapshot | |||
155 | 153 | ||
156 | m_log.DebugFormat("[DATASNAPSHOT]: Module added to Scene {0}.", scene.RegionInfo.RegionName); | 154 | m_log.DebugFormat("[DATASNAPSHOT]: Module added to Scene {0}.", scene.RegionInfo.RegionName); |
157 | 155 | ||
158 | m_snapStore.AddScene(scene); | 156 | if (!m_servicesNotified) |
157 | { | ||
158 | m_hostname = scene.RegionInfo.ExternalHostName; | ||
159 | m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); | ||
160 | |||
161 | //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer | ||
162 | new DataRequestHandler(scene, this); | ||
163 | |||
164 | if (m_dataServices != "" && m_dataServices != "noservices") | ||
165 | NotifyDataServices(m_dataServices, "online"); | ||
166 | |||
167 | m_servicesNotified = true; | ||
168 | } | ||
169 | |||
159 | m_scenes.Add(scene); | 170 | m_scenes.Add(scene); |
171 | m_snapStore.AddScene(scene); | ||
160 | 172 | ||
161 | Assembly currentasm = Assembly.GetExecutingAssembly(); | 173 | Assembly currentasm = Assembly.GetExecutingAssembly(); |
162 | 174 | ||
@@ -181,22 +193,6 @@ namespace OpenSim.Region.DataSnapshot | |||
181 | } | 193 | } |
182 | } | 194 | } |
183 | 195 | ||
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 | } | ||
200 | } | 196 | } |
201 | 197 | ||
202 | public void RemoveRegion(Scene scene) | 198 | public void RemoveRegion(Scene scene) |