diff options
author | Justin Clark-Casey (justincc) | 2013-08-22 01:20:01 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-22 01:20:01 +0100 |
commit | bcb8605f8428a9009a2badf9c9eed06d9f59962c (patch) | |
tree | 976f85d425fe2596245c5e9867cbc4c3e12917b6 /OpenSim/Services/HypergridService | |
parent | Implement ability for hg logins to try fallback regions just like local logins. (diff) | |
download | opensim-SC-bcb8605f8428a9009a2badf9c9eed06d9f59962c.zip opensim-SC-bcb8605f8428a9009a2badf9c9eed06d9f59962c.tar.gz opensim-SC-bcb8605f8428a9009a2badf9c9eed06d9f59962c.tar.bz2 opensim-SC-bcb8605f8428a9009a2badf9c9eed06d9f59962c.tar.xz |
Revert "Implement ability for hg logins to try fallback regions just like local logins."
This approach does not work - it is taking place too far down the login process where really the region checking
could only be done when the hg map tiles are linked on the main map (messy and probably impossible) or possibly
when the final destination is fetched at the very first stage of teleport (which couldn't be done without a protocol
change to pass the agentID as well as the requested regionID)
This reverts commit 3d9b73c47a15cf00150ac80570fea88de8cecbdf.
Diffstat (limited to 'OpenSim/Services/HypergridService')
-rw-r--r-- | OpenSim/Services/HypergridService/GatekeeperService.cs | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index cbe1af0..0a3e70b 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs | |||
@@ -326,7 +326,7 @@ namespace OpenSim.Services.HypergridService | |||
326 | return false; | 326 | return false; |
327 | } | 327 | } |
328 | 328 | ||
329 | m_log.DebugFormat("[GATEKEEPER SERVICE]: User {0} is ok", aCircuit.Name); | 329 | m_log.DebugFormat("[GATEKEEPER SERVICE]: User is OK"); |
330 | 330 | ||
331 | bool isFirstLogin = false; | 331 | bool isFirstLogin = false; |
332 | // | 332 | // |
@@ -345,7 +345,7 @@ namespace OpenSim.Services.HypergridService | |||
345 | aCircuit.firstname, aCircuit.lastname); | 345 | aCircuit.firstname, aCircuit.lastname); |
346 | return false; | 346 | return false; |
347 | } | 347 | } |
348 | m_log.DebugFormat("[GATEKEEPER SERVICE]: Login presence {0} is ok", aCircuit.Name); | 348 | m_log.DebugFormat("[GATEKEEPER SERVICE]: Login presence ok"); |
349 | 349 | ||
350 | // Also login foreigners with GridUser service | 350 | // Also login foreigners with GridUser service |
351 | if (m_GridUserService != null && account == null) | 351 | if (m_GridUserService != null && account == null) |
@@ -376,8 +376,7 @@ namespace OpenSim.Services.HypergridService | |||
376 | reason = "Destination region not found"; | 376 | reason = "Destination region not found"; |
377 | return false; | 377 | return false; |
378 | } | 378 | } |
379 | m_log.DebugFormat( | 379 | m_log.DebugFormat("[GATEKEEPER SERVICE]: destination ok: {0}", destination.RegionName); |
380 | "[GATEKEEPER SERVICE]: Destination {0} is ok for {1}", destination.RegionName, aCircuit.Name); | ||
381 | 380 | ||
382 | // | 381 | // |
383 | // Adjust the visible name | 382 | // Adjust the visible name |
@@ -411,41 +410,8 @@ namespace OpenSim.Services.HypergridService | |||
411 | // Preserve our TeleportFlags we have gathered so-far | 410 | // Preserve our TeleportFlags we have gathered so-far |
412 | loginFlag |= (Constants.TeleportFlags) aCircuit.teleportFlags; | 411 | loginFlag |= (Constants.TeleportFlags) aCircuit.teleportFlags; |
413 | 412 | ||
414 | m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0} {1}", aCircuit.Name, loginFlag); | 413 | m_log.DebugFormat("[GATEKEEPER SERVICE]: launching agent {0}", loginFlag); |
415 | 414 | return m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason); | |
416 | bool success = m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason); | ||
417 | |||
418 | if (!success) | ||
419 | { | ||
420 | List<GridRegion> fallbackRegions = m_GridService.GetFallbackRegions(account.ScopeID, destination.RegionLocX, destination.RegionLocY); | ||
421 | if (fallbackRegions != null) | ||
422 | { | ||
423 | // Try the fallback regions | ||
424 | m_log.DebugFormat( | ||
425 | "[GATEKEEPER SERVICE]: Could not successfully log agent {0} into {1}. Trying fallback regions.", | ||
426 | aCircuit.Name, destination.RegionName); | ||
427 | |||
428 | foreach (GridRegion fallbackRegion in fallbackRegions) | ||
429 | { | ||
430 | m_log.DebugFormat( | ||
431 | "[GATEKEEPER SERVICE]: Trying fallback region {0} for {1}", | ||
432 | fallbackRegion.RegionName, aCircuit.Name); | ||
433 | |||
434 | success = m_SimulationService.CreateAgent(fallbackRegion, aCircuit, (uint)loginFlag, out reason); | ||
435 | |||
436 | if (success) | ||
437 | break; | ||
438 | } | ||
439 | } | ||
440 | else | ||
441 | { | ||
442 | m_log.DebugFormat( | ||
443 | "[GATEKEEPER SERVICE]: Could not successfully log agent {0} into {1} and no fallback regions to try.", | ||
444 | aCircuit.Name, destination.RegionName); | ||
445 | } | ||
446 | } | ||
447 | |||
448 | return success; | ||
449 | } | 415 | } |
450 | 416 | ||
451 | protected bool Authenticate(AgentCircuitData aCircuit) | 417 | protected bool Authenticate(AgentCircuitData aCircuit) |