Bug fix for finding default regions if the specified one doesn't exist.

slimupdates
Diva Canto 2010-02-01 16:52:42 -08:00
parent bb736cee6b
commit 4eeddf3078
1 changed files with 4 additions and 6 deletions

View File

@ -267,7 +267,7 @@ namespace OpenSim.Services.LLLoginService
GridRegion region = null; GridRegion region = null;
if (pinfo.HomeRegionID.Equals(UUID.Zero)) if (pinfo.HomeRegionID.Equals(UUID.Zero) || (region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.HomeRegionID)) == null)
{ {
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)
@ -279,8 +279,6 @@ namespace OpenSim.Services.LLLoginService
m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a home set and this grid does not have default locations.", m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a home set and this grid does not have default locations.",
account.FirstName, account.LastName); account.FirstName, account.LastName);
} }
else
region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.HomeRegionID);
return region; return region;
} }
@ -294,7 +292,7 @@ namespace OpenSim.Services.LLLoginService
GridRegion region = null; GridRegion region = null;
if (pinfo.RegionID.Equals(UUID.Zero)) if (pinfo.RegionID.Equals(UUID.Zero) || (region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.RegionID)) == null)
{ {
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)
@ -305,7 +303,6 @@ namespace OpenSim.Services.LLLoginService
} }
else else
{ {
region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.RegionID);
position = pinfo.Position; position = pinfo.Position;
lookAt = pinfo.LookAt; lookAt = pinfo.LookAt;
} }
@ -590,6 +587,7 @@ namespace OpenSim.Services.LLLoginService
private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, out string reason) private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, out string reason)
{ {
m_log.Debug("XXX Launching agent at {0}" + destination.RegionName);
return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason); return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason);
} }