From a1643c78beddf6e96d6bf124cdee8ef8c96cab51 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 4 Mar 2010 22:43:30 +0000 Subject: remove test presence from NullPresenceData since this appears to stop existing sessions with home locations from being picked up only tested for a single user so this may still fail for multiple users this may well be all academic anyway since standalone need to persistently store home location in presence data in some way --- OpenSim/Services/LLLoginService/LLLoginService.cs | 31 ++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs') diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index ee93f73..ae729f8 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -279,7 +279,31 @@ namespace OpenSim.Services.LLLoginService GridRegion region = null; - if (pinfo.HomeRegionID.Equals(UUID.Zero) || (region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.HomeRegionID)) == null) + bool tryDefaults = false; + + if (pinfo.HomeRegionID.Equals(UUID.Zero)) + { + m_log.WarnFormat( + "[LLOGIN SERVICE]: User {0} {1} tried to login to a 'home' start location but they have none set", + account.FirstName, account.LastName); + + tryDefaults = true; + } + else + { + region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.HomeRegionID); + + if (null == region) + { + m_log.WarnFormat( + "[LLOGIN SERVICE]: User {0} {1} has a recorded home region of {2} but this cannot be found by the grid service", + account.FirstName, account.LastName, pinfo.HomeRegionID); + + tryDefaults = true; + } + } + + if (tryDefaults) { List defaults = m_GridService.GetDefaultRegions(account.ScopeID); if (defaults != null && defaults.Count > 0) @@ -288,7 +312,8 @@ namespace OpenSim.Services.LLLoginService where = "safe"; } else - 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 valid home and this grid does not have default locations.", account.FirstName, account.LastName); } @@ -318,8 +343,8 @@ namespace OpenSim.Services.LLLoginService position = pinfo.Position; lookAt = pinfo.LookAt; } + return region; - } else { -- cgit v1.1