From 8ee0bdb86e9dbc841a0ae5a581c18f63d06a548c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 26 Mar 2010 13:13:33 -0700 Subject: Minor improvement on debug message. --- OpenSim/Services/LLLoginService/LLLoginService.cs | 61 +++++++++++------------ 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 9846364..7b25274 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -332,23 +332,22 @@ namespace OpenSim.Services.LLLoginService if (tryDefaults) { - List defaults = m_GridService.GetDefaultRegions(account.ScopeID); - if (defaults != null && defaults.Count > 0) - { - region = defaults[0]; - where = "safe"; - } - else - { - m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a valid home and this grid does not have default locations.", - account.FirstName, account.LastName); - m_log.Info("[LLOGIN SERVICE]: Home Region Not Found Attempting to find random region"); - defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1); - if (defaults != null && defaults.Count > 0) - { - region = defaults[0]; - where = "safe"; - } + List defaults = m_GridService.GetDefaultRegions(account.ScopeID); + if (defaults != null && defaults.Count > 0) + { + region = defaults[0]; + where = "safe"; + } + else + { + m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a valid home and this grid does not have default locations. Attempting to find random region", + account.FirstName, account.LastName); + defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1); + if (defaults != null && defaults.Count > 0) + { + region = defaults[0]; + where = "safe"; + } } } @@ -371,16 +370,16 @@ namespace OpenSim.Services.LLLoginService { region = defaults[0]; where = "safe"; - } - else - { - m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); - defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1); - if (defaults != null && defaults.Count > 0) - { - region = defaults[0]; - where = "safe"; - } + } + else + { + m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); + defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1); + if (defaults != null && defaults.Count > 0) + { + region = defaults[0]; + where = "safe"; + } } } @@ -393,7 +392,7 @@ namespace OpenSim.Services.LLLoginService return region; } else - { + { // free uri form // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 where = "url"; @@ -414,7 +413,7 @@ namespace OpenSim.Services.LLLoginService if (regionName != null) { if (!regionName.Contains("@")) - { + { List regions = m_GridService.GetRegionsByName(account.ScopeID, regionName, 1); if ((regions == null) || (regions != null && regions.Count == 0)) { @@ -434,7 +433,7 @@ namespace OpenSim.Services.LLLoginService return regions[0]; } else - { + { if (m_UserAgentService == null) { m_log.WarnFormat("[LLLOGIN SERVICE]: This llogin service is not running a user agent service, as such it can't lauch agents at foreign grids"); @@ -446,7 +445,7 @@ namespace OpenSim.Services.LLLoginService m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}", startLocation, regionName); return null; } - // Valid specification of a remote grid + // Valid specification of a remote grid regionName = parts[0]; string domainLocator = parts[1]; -- cgit v1.1