diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rwxr-xr-x | OpenSim/Services/LLLoginService/LLLoginService.cs | 53 |
1 files changed, 20 insertions, 33 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 8baaccb..d4ec0e5 100755 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -285,18 +285,15 @@ namespace OpenSim.Services.LLLoginService | |||
285 | } | 285 | } |
286 | 286 | ||
287 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, | 287 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, |
288 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient) | 288 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP) |
289 | { | 289 | { |
290 | bool success = false; | 290 | bool success = false; |
291 | UUID session = UUID.Random(); | 291 | UUID session = UUID.Random(); |
292 | 292 | ||
293 | string processedMessage; | 293 | string processedMessage; |
294 | 294 | ||
295 | if (clientVersion.Contains("Radegast")) | ||
296 | LibOMVclient = false; | ||
297 | |||
298 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", | 295 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", |
299 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); | 296 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); |
300 | 297 | ||
301 | string curMac = mac.ToString(); | 298 | string curMac = mac.ToString(); |
302 | 299 | ||
@@ -699,7 +696,6 @@ namespace OpenSim.Services.LLLoginService | |||
699 | where = "safe"; | 696 | where = "safe"; |
700 | } | 697 | } |
701 | } | 698 | } |
702 | |||
703 | } | 699 | } |
704 | else | 700 | else |
705 | { | 701 | { |
@@ -735,41 +731,32 @@ namespace OpenSim.Services.LLLoginService | |||
735 | { | 731 | { |
736 | if (!regionName.Contains("@")) | 732 | if (!regionName.Contains("@")) |
737 | { | 733 | { |
738 | List<GridRegion> regions = m_GridService.GetRegionsByName(scopeID, regionName, 1); | 734 | region = m_GridService.GetRegionByName (scopeID, regionName); |
739 | if ((regions == null) || (regions != null && regions.Count == 0)) | 735 | if(region != null) |
736 | return region; | ||
737 | |||
738 | m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName); | ||
739 | List<GridRegion> regions = m_GridService.GetDefaultRegions(scopeID); | ||
740 | if (regions != null && regions.Count > 0) | ||
740 | { | 741 | { |
741 | m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName); | 742 | where = "safe"; |
742 | regions = m_GridService.GetDefaultRegions(scopeID); | 743 | return regions[0]; |
743 | if (regions != null && regions.Count > 0) | 744 | } |
745 | else | ||
746 | { | ||
747 | m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); | ||
748 | region = FindAlternativeRegion(scopeID); | ||
749 | if (region != null) | ||
744 | { | 750 | { |
745 | where = "safe"; | 751 | where = "safe"; |
746 | return regions[0]; | 752 | return region; |
747 | } | 753 | } |
748 | else | 754 | else |
749 | { | 755 | { |
750 | m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); | 756 | m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions and no alternative found.", startLocation); |
751 | region = FindAlternativeRegion(scopeID); | 757 | return null; |
752 | if (region != null) | ||
753 | { | ||
754 | where = "safe"; | ||
755 | return region; | ||
756 | } | ||
757 | else | ||
758 | { | ||
759 | m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions and no alternative found.", startLocation); | ||
760 | return null; | ||
761 | } | ||
762 | } | 758 | } |
763 | } | 759 | } |
764 | |||
765 | //find a exact match | ||
766 | foreach(GridRegion r in regions) | ||
767 | { | ||
768 | if(string.Equals(regionName, r.RegionName, StringComparison.InvariantCultureIgnoreCase)) | ||
769 | return r; | ||
770 | } | ||
771 | // else, whatever | ||
772 | return regions[0]; | ||
773 | } | 760 | } |
774 | else | 761 | else |
775 | { | 762 | { |