From 108f3b89f59837ec89df4cb6d2ca5c24b574a773 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sun, 7 Sep 2008 05:29:12 +0000 Subject: [PATCH] * On a failing login, don't bother trying the default region if it's the same as the original login region --- OpenSim/Grid/UserServer/UserLoginService.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index da41dfd775..f22e084228 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -241,13 +241,17 @@ namespace OpenSim.Grid.UserServer // Send him to default region instead // Load information from the gridserver ulong defaultHandle = (((ulong) m_config.DefaultX * Constants.RegionSize) << 32) | - ((ulong) m_config.DefaultY * Constants.RegionSize); + ((ulong) m_config.DefaultY * Constants.RegionSize); + + if (defaultHandle == SimInfo.regionHandle) + { + m_log.ErrorFormat("[LOGIN]: Not trying the default region since this is the same as the selected region"); + return false; + } m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead"); - SimInfo = RegionProfileData.RequestSimProfileData( - defaultHandle, m_config.GridServerURL, - m_config.GridSendKey, m_config.GridRecvKey); + SimInfo = RegionProfileData.RequestSimProfileData(defaultHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); // Customise the response response.Home =