From 3a87cce2e0367a631c4ee2d9e4fae8c701bd604a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 22 Jul 2014 18:01:54 +0100 Subject: Fix recent regression in 3c6becd5 where login or hg login to variable sized regions failed with outdated simulator message. I forgot that a null 'their version' would not be passed over the wire and ends up as an empty string instead (like older simulators). So instead pass through the correct simulator protcol version instead (SIMULATOR/0.3) when querying from login or hg login. Also removes a debug console write for agent limit accidentally left in for the same commit. Relates to mantis 7276 --- .../Simulation/LocalSimulationConnector.cs | 27 ++++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 50105a6..8fd5df8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -283,22 +283,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation // s.RegionInfo.RegionName, destination.RegionHandle); uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX; - if (theirversion != null) + float theirVersionNumber = 0f; + string[] versionComponents = theirversion.Split(new char[] { '/' }); + if (versionComponents.Length >= 2) + float.TryParse(versionComponents[1], out theirVersionNumber); + + // Var regions here, and the requesting simulator is in an older version. + // We will forbide this, because it crashes the viewers + if (theirVersionNumber < 0.3f && size > 256) { - float theirVersionNumber = 0f; - string[] versionComponents = theirversion.Split(new char[] { '/' }); - if (versionComponents.Length >= 2) - float.TryParse(versionComponents[1], out theirVersionNumber); - - // Var regions here, and the requesting simulator is in an older version. - // We will forbide this, because it crashes the viewers - if (theirVersionNumber < 0.3f && size > 256) - { - reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; - m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber); - return false; - - } + reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; + m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber); + return false; + } return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, out reason); -- cgit v1.1