From 31aef4e82b2e746837a6ef0fcd8d3f1b7385bc8e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 14 Nov 2019 06:34:44 +0000 Subject: work on previus 2 patchs --- OpenSim/Services/LLLoginService/LLLoginService.cs | 53 +++++++++-------------- 1 file changed, 20 insertions(+), 33 deletions(-) (limited to 'OpenSim/Services/LLLoginService') 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 } public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, - string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient) + string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP) { bool success = false; UUID session = UUID.Random(); string processedMessage; - if (clientVersion.Contains("Radegast")) - LibOMVclient = false; - 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} ", - firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); + firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); string curMac = mac.ToString(); @@ -699,7 +696,6 @@ namespace OpenSim.Services.LLLoginService where = "safe"; } } - } else { @@ -735,41 +731,32 @@ namespace OpenSim.Services.LLLoginService { if (!regionName.Contains("@")) { - List regions = m_GridService.GetRegionsByName(scopeID, regionName, 1); - if ((regions == null) || (regions != null && regions.Count == 0)) + region = m_GridService.GetRegionByName (scopeID, regionName); + if(region != null) + return region; + + m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName); + List regions = m_GridService.GetDefaultRegions(scopeID); + if (regions != null && regions.Count > 0) { - m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName); - regions = m_GridService.GetDefaultRegions(scopeID); - if (regions != null && regions.Count > 0) + where = "safe"; + return regions[0]; + } + else + { + m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); + region = FindAlternativeRegion(scopeID); + if (region != null) { where = "safe"; - return regions[0]; + return region; } else { - m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); - region = FindAlternativeRegion(scopeID); - if (region != null) - { - where = "safe"; - return region; - } - else - { - m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions and no alternative found.", startLocation); - return null; - } + m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions and no alternative found.", startLocation); + return null; } } - - //find a exact match - foreach(GridRegion r in regions) - { - if(string.Equals(regionName, r.RegionName, StringComparison.InvariantCultureIgnoreCase)) - return r; - } - // else, whatever - return regions[0]; } else { -- cgit v1.1