diff options
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Conflicts:
bin/Regions/Regions.ini.example
Diffstat (limited to 'OpenSim/Region/DataSnapshot/DataSnapshotManager.cs')
-rw-r--r-- | OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 5e62f23..dd48dd5 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |||
@@ -113,9 +113,17 @@ namespace OpenSim.Region.DataSnapshot | |||
113 | try | 113 | try |
114 | { | 114 | { |
115 | m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); | 115 | m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); |
116 | IConfig conf = config.Configs["GridService"]; | 116 | string gatekeeper = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
117 | if (conf != null) | 117 | new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); |
118 | m_gridinfo.Add("gatekeeperURL", conf.GetString("Gatekeeper", String.Empty)); | 118 | // Legacy. Remove soon! |
119 | if (string.IsNullOrEmpty(gatekeeper)) | ||
120 | { | ||
121 | IConfig conf = config.Configs["GridService"]; | ||
122 | if (conf != null) | ||
123 | gatekeeper = conf.GetString("Gatekeeper", gatekeeper); | ||
124 | } | ||
125 | if (!string.IsNullOrEmpty(gatekeeper)) | ||
126 | m_gridinfo.Add("gatekeeperURL", gatekeeper); | ||
119 | 127 | ||
120 | m_gridinfo.Add( | 128 | m_gridinfo.Add( |
121 | "name", config.Configs["DataSnapshot"].GetString("gridname", "the lost continent of hippo")); | 129 | "name", config.Configs["DataSnapshot"].GetString("gridname", "the lost continent of hippo")); |
@@ -140,8 +148,6 @@ namespace OpenSim.Region.DataSnapshot | |||
140 | return; | 148 | return; |
141 | } | 149 | } |
142 | 150 | ||
143 | if (m_enabled) | ||
144 | m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); | ||
145 | } | 151 | } |
146 | 152 | ||
147 | } | 153 | } |
@@ -155,8 +161,22 @@ namespace OpenSim.Region.DataSnapshot | |||
155 | 161 | ||
156 | 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); |
157 | 163 | ||
158 | 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 | |||
159 | m_scenes.Add(scene); | 178 | m_scenes.Add(scene); |
179 | m_snapStore.AddScene(scene); | ||
160 | 180 | ||
161 | Assembly currentasm = Assembly.GetExecutingAssembly(); | 181 | Assembly currentasm = Assembly.GetExecutingAssembly(); |
162 | 182 | ||
@@ -181,22 +201,6 @@ namespace OpenSim.Region.DataSnapshot | |||
181 | } | 201 | } |
182 | } | 202 | } |
183 | 203 | ||
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 | } | 204 | } |
201 | 205 | ||
202 | public void RemoveRegion(Scene scene) | 206 | public void RemoveRegion(Scene scene) |