Minor improvement on debug message.

slimupdates
Diva Canto 2010-03-26 13:13:33 -07:00
parent 9fb17e7ab2
commit 8ee0bdb86e
1 changed files with 30 additions and 31 deletions

View File

@ -332,23 +332,22 @@ namespace OpenSim.Services.LLLoginService
if (tryDefaults) if (tryDefaults)
{ {
List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID); List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID);
if (defaults != null && defaults.Count > 0) if (defaults != null && defaults.Count > 0)
{ {
region = defaults[0]; region = defaults[0];
where = "safe"; where = "safe";
} }
else else
{ {
m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a valid home and this grid does not have default locations.", 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); 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);
defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1); if (defaults != null && defaults.Count > 0)
if (defaults != null && defaults.Count > 0) {
{ region = defaults[0];
region = defaults[0]; where = "safe";
where = "safe"; }
}
} }
} }
@ -371,16 +370,16 @@ namespace OpenSim.Services.LLLoginService
{ {
region = defaults[0]; region = defaults[0];
where = "safe"; where = "safe";
} }
else else
{ {
m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region");
defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1); defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1);
if (defaults != null && defaults.Count > 0) if (defaults != null && defaults.Count > 0)
{ {
region = defaults[0]; region = defaults[0];
where = "safe"; where = "safe";
} }
} }
} }
@ -393,7 +392,7 @@ namespace OpenSim.Services.LLLoginService
return region; return region;
} }
else else
{ {
// free uri form // free uri form
// e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34
where = "url"; where = "url";
@ -414,7 +413,7 @@ namespace OpenSim.Services.LLLoginService
if (regionName != null) if (regionName != null)
{ {
if (!regionName.Contains("@")) if (!regionName.Contains("@"))
{ {
List<GridRegion> regions = m_GridService.GetRegionsByName(account.ScopeID, regionName, 1); List<GridRegion> regions = m_GridService.GetRegionsByName(account.ScopeID, regionName, 1);
if ((regions == null) || (regions != null && regions.Count == 0)) if ((regions == null) || (regions != null && regions.Count == 0))
{ {
@ -434,7 +433,7 @@ namespace OpenSim.Services.LLLoginService
return regions[0]; return regions[0];
} }
else else
{ {
if (m_UserAgentService == null) 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"); 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); m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}", startLocation, regionName);
return null; return null;
} }
// Valid specification of a remote grid // Valid specification of a remote grid
regionName = parts[0]; regionName = parts[0];
string domainLocator = parts[1]; string domainLocator = parts[1];