diff options
Some more refactoring of GridServer.
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r-- | OpenSim/Grid/GridServer/GridDBService.cs | 25 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer/GridXmlRpcModule.cs | 21 |
2 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Grid/GridServer/GridDBService.cs b/OpenSim/Grid/GridServer/GridDBService.cs index 389cf69..94c8dcd 100644 --- a/OpenSim/Grid/GridServer/GridDBService.cs +++ b/OpenSim/Grid/GridServer/GridDBService.cs | |||
@@ -197,14 +197,13 @@ namespace OpenSim.Grid.GridServer | |||
197 | return regions; | 197 | return regions; |
198 | } | 198 | } |
199 | 199 | ||
200 | public void LoginRegion(RegionProfileData sim, RegionProfileData existingSim) | 200 | public DataResponse LoginRegion(RegionProfileData sim, RegionProfileData existingSim) |
201 | { | 201 | { |
202 | DataResponse insertResponse = DataResponse.RESPONSE_ERROR; | ||
202 | foreach (IGridDataPlugin plugin in _plugins) | 203 | foreach (IGridDataPlugin plugin in _plugins) |
203 | { | 204 | { |
204 | try | 205 | try |
205 | { | 206 | { |
206 | DataResponse insertResponse; | ||
207 | |||
208 | if (existingSim == null) | 207 | if (existingSim == null) |
209 | { | 208 | { |
210 | insertResponse = plugin.AddProfile(sim); | 209 | insertResponse = plugin.AddProfile(sim); |
@@ -213,25 +212,6 @@ namespace OpenSim.Grid.GridServer | |||
213 | { | 212 | { |
214 | insertResponse = plugin.UpdateProfile(sim); | 213 | insertResponse = plugin.UpdateProfile(sim); |
215 | } | 214 | } |
216 | |||
217 | switch (insertResponse) | ||
218 | { | ||
219 | case DataResponse.RESPONSE_OK: | ||
220 | m_log.Info("[LOGIN END]: " + (existingSim == null ? "New" : "Existing") + " sim login successful: " + sim.regionName); | ||
221 | break; | ||
222 | case DataResponse.RESPONSE_ERROR: | ||
223 | m_log.Warn("[LOGIN END]: Sim login failed (Error): " + sim.regionName); | ||
224 | break; | ||
225 | case DataResponse.RESPONSE_INVALIDCREDENTIALS: | ||
226 | m_log.Warn("[LOGIN END]: " + | ||
227 | "Sim login failed (Invalid Credentials): " + sim.regionName); | ||
228 | break; | ||
229 | case DataResponse.RESPONSE_AUTHREQUIRED: | ||
230 | m_log.Warn("[LOGIN END]: " + | ||
231 | "Sim login failed (Authentication Required): " + | ||
232 | sim.regionName); | ||
233 | break; | ||
234 | } | ||
235 | } | 215 | } |
236 | catch (Exception e) | 216 | catch (Exception e) |
237 | { | 217 | { |
@@ -240,6 +220,7 @@ namespace OpenSim.Grid.GridServer | |||
240 | m_log.Warn("[LOGIN END]: " + e.ToString()); | 220 | m_log.Warn("[LOGIN END]: " + e.ToString()); |
241 | } | 221 | } |
242 | } | 222 | } |
223 | return insertResponse; | ||
243 | } | 224 | } |
244 | 225 | ||
245 | public DataResponse DeleteRegion(string uuid) | 226 | public DataResponse DeleteRegion(string uuid) |
diff --git a/OpenSim/Grid/GridServer/GridXmlRpcModule.cs b/OpenSim/Grid/GridServer/GridXmlRpcModule.cs index af83985..c2cd1d6 100644 --- a/OpenSim/Grid/GridServer/GridXmlRpcModule.cs +++ b/OpenSim/Grid/GridServer/GridXmlRpcModule.cs | |||
@@ -305,7 +305,26 @@ namespace OpenSim.Grid.GridServer | |||
305 | return e.XmlRpcErrorResponse; | 305 | return e.XmlRpcErrorResponse; |
306 | } | 306 | } |
307 | 307 | ||
308 | m_gridDBService.LoginRegion(sim, existingSim); | 308 | DataResponse insertResponse = m_gridDBService.LoginRegion(sim, existingSim); |
309 | |||
310 | switch (insertResponse) | ||
311 | { | ||
312 | case DataResponse.RESPONSE_OK: | ||
313 | m_log.Info("[LOGIN END]: " + (existingSim == null ? "New" : "Existing") + " sim login successful: " + sim.regionName); | ||
314 | break; | ||
315 | case DataResponse.RESPONSE_ERROR: | ||
316 | m_log.Warn("[LOGIN END]: Sim login failed (Error): " + sim.regionName); | ||
317 | break; | ||
318 | case DataResponse.RESPONSE_INVALIDCREDENTIALS: | ||
319 | m_log.Warn("[LOGIN END]: " + | ||
320 | "Sim login failed (Invalid Credentials): " + sim.regionName); | ||
321 | break; | ||
322 | case DataResponse.RESPONSE_AUTHREQUIRED: | ||
323 | m_log.Warn("[LOGIN END]: " + | ||
324 | "Sim login failed (Authentication Required): " + | ||
325 | sim.regionName); | ||
326 | break; | ||
327 | } | ||
309 | 328 | ||
310 | XmlRpcResponse response = CreateLoginResponse(sim); | 329 | XmlRpcResponse response = CreateLoginResponse(sim); |
311 | 330 | ||