diff options
author | BlueWall | 2011-06-01 13:44:20 -0400 |
---|---|---|
committer | BlueWall | 2011-06-01 13:44:20 -0400 |
commit | aed6e74080a23bab148c085140e412aa0ba0aef2 (patch) | |
tree | e8eebf0a12750e69be195e9b3c21369b9d005434 | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-aed6e74080a23bab148c085140e412aa0ba0aef2.zip opensim-SC_OLD-aed6e74080a23bab148c085140e412aa0ba0aef2.tar.gz opensim-SC_OLD-aed6e74080a23bab148c085140e412aa0ba0aef2.tar.bz2 opensim-SC_OLD-aed6e74080a23bab148c085140e412aa0ba0aef2.tar.xz |
Add alternate region handling for url based logins as found in login to "home" or "last"
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index a5a728b..5d1779a 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -516,6 +516,7 @@ namespace OpenSim.Services.LLLoginService | |||
516 | // free uri form | 516 | // free uri form |
517 | // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 | 517 | // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 |
518 | where = "url"; | 518 | where = "url"; |
519 | GridRegion region = null; | ||
519 | Regex reURI = new Regex(@"^uri:(?<region>[^&]+)&(?<x>\d+)&(?<y>\d+)&(?<z>\d+)$"); | 520 | Regex reURI = new Regex(@"^uri:(?<region>[^&]+)&(?<x>\d+)&(?<y>\d+)&(?<z>\d+)$"); |
520 | Match uriMatch = reURI.Match(startLocation); | 521 | Match uriMatch = reURI.Match(startLocation); |
521 | if (uriMatch == null) | 522 | if (uriMatch == null) |
@@ -546,8 +547,18 @@ namespace OpenSim.Services.LLLoginService | |||
546 | } | 547 | } |
547 | else | 548 | else |
548 | { | 549 | { |
549 | m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions.", startLocation); | 550 | m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); |
550 | return null; | 551 | region = FindAlternativeRegion(scopeID); |
552 | if (region != null) | ||
553 | { | ||
554 | where = "safe"; | ||
555 | return region; | ||
556 | } | ||
557 | else | ||
558 | { | ||
559 | m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions and no alternative found.", startLocation); | ||
560 | return null; | ||
561 | } | ||
551 | } | 562 | } |
552 | } | 563 | } |
553 | return regions[0]; | 564 | return regions[0]; |
@@ -575,7 +586,8 @@ namespace OpenSim.Services.LLLoginService | |||
575 | if (parts.Length > 1) | 586 | if (parts.Length > 1) |
576 | UInt32.TryParse(parts[1], out port); | 587 | UInt32.TryParse(parts[1], out port); |
577 | 588 | ||
578 | GridRegion region = FindForeignRegion(domainName, port, regionName, out gatekeeper); | 589 | // GridRegion region = FindForeignRegion(domainName, port, regionName, out gatekeeper); |
590 | region = FindForeignRegion(domainName, port, regionName, out gatekeeper); | ||
579 | return region; | 591 | return region; |
580 | } | 592 | } |
581 | } | 593 | } |