diff options
author | Justin Clark-Casey (justincc) | 2014-07-22 18:01:54 +0100 |
---|---|---|
committer | Justin Clark-Casey | 2014-08-02 00:57:59 +0100 |
commit | dfaabf4d0d01eddc4a6e4cd9ff9379fcf296ff03 (patch) | |
tree | 6297fb8cfc9be6190a36955981340fdc1d39fac8 | |
parent | minor: convert tabs to spaces that got in on recent commit 4a9282e (diff) | |
download | opensim-SC_OLD-dfaabf4d0d01eddc4a6e4cd9ff9379fcf296ff03.zip opensim-SC_OLD-dfaabf4d0d01eddc4a6e4cd9ff9379fcf296ff03.tar.gz opensim-SC_OLD-dfaabf4d0d01eddc4a6e4cd9ff9379fcf296ff03.tar.bz2 opensim-SC_OLD-dfaabf4d0d01eddc4a6e4cd9ff9379fcf296ff03.tar.xz |
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
4 files changed, 17 insertions, 20 deletions
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 | |||
283 | // s.RegionInfo.RegionName, destination.RegionHandle); | 283 | // s.RegionInfo.RegionName, destination.RegionHandle); |
284 | uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX; | 284 | uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX; |
285 | 285 | ||
286 | if (theirversion != null) | 286 | float theirVersionNumber = 0f; |
287 | string[] versionComponents = theirversion.Split(new char[] { '/' }); | ||
288 | if (versionComponents.Length >= 2) | ||
289 | float.TryParse(versionComponents[1], out theirVersionNumber); | ||
290 | |||
291 | // Var regions here, and the requesting simulator is in an older version. | ||
292 | // We will forbide this, because it crashes the viewers | ||
293 | if (theirVersionNumber < 0.3f && size > 256) | ||
287 | { | 294 | { |
288 | float theirVersionNumber = 0f; | 295 | reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; |
289 | string[] versionComponents = theirversion.Split(new char[] { '/' }); | 296 | m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber); |
290 | if (versionComponents.Length >= 2) | 297 | return false; |
291 | float.TryParse(versionComponents[1], out theirVersionNumber); | 298 | |
292 | |||
293 | // Var regions here, and the requesting simulator is in an older version. | ||
294 | // We will forbide this, because it crashes the viewers | ||
295 | if (theirVersionNumber < 0.3f && size > 256) | ||
296 | { | ||
297 | reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; | ||
298 | m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber); | ||
299 | return false; | ||
300 | |||
301 | } | ||
302 | } | 299 | } |
303 | 300 | ||
304 | return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, out reason); | 301 | return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, out reason); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4bbe68b..27929c6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5514,7 +5514,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
5514 | 5514 | ||
5515 | int num = m_sceneGraph.GetRootAgentCount(); | 5515 | int num = m_sceneGraph.GetRootAgentCount(); |
5516 | 5516 | ||
5517 | Console.WriteLine("{0} {1}", num, RegionInfo.RegionSettings.AgentLimit); | ||
5518 | if (num >= RegionInfo.RegionSettings.AgentLimit) | 5517 | if (num >= RegionInfo.RegionSettings.AgentLimit) |
5519 | { | 5518 | { |
5520 | if (!Permissions.IsAdministrator(agentID)) | 5519 | if (!Permissions.IsAdministrator(agentID)) |
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 771114e..15d3305 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs | |||
@@ -436,7 +436,7 @@ namespace OpenSim.Services.HypergridService | |||
436 | 436 | ||
437 | if (!m_SimulationService.QueryAccess( | 437 | if (!m_SimulationService.QueryAccess( |
438 | destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), | 438 | destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), |
439 | true, aCircuit.startpos, null, out version, out reason)) | 439 | true, aCircuit.startpos, "SIMULATION/0.3", out version, out reason)) |
440 | return false; | 440 | return false; |
441 | 441 | ||
442 | return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); | 442 | return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 264a630..0ad9f92 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -961,7 +961,9 @@ namespace OpenSim.Services.LLLoginService | |||
961 | { | 961 | { |
962 | string version; | 962 | string version; |
963 | 963 | ||
964 | if (!simConnector.QueryAccess(region, aCircuit.AgentID, null, true, aCircuit.startpos, null, out version, out reason)) | 964 | if ( |
965 | !simConnector.QueryAccess( | ||
966 | region, aCircuit.AgentID, null, true, aCircuit.startpos, "SIMULATION/0.3", out version, out reason)) | ||
965 | return false; | 967 | return false; |
966 | 968 | ||
967 | return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); | 969 | return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); |
@@ -969,9 +971,8 @@ namespace OpenSim.Services.LLLoginService | |||
969 | 971 | ||
970 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) | 972 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) |
971 | { | 973 | { |
972 | string version; | ||
973 | |||
974 | m_log.Debug("[LLOGIN SERVICE]: Launching agent at " + destination.RegionName); | 974 | m_log.Debug("[LLOGIN SERVICE]: Launching agent at " + destination.RegionName); |
975 | |||
975 | if (m_UserAgentService.LoginAgentToGrid(null, aCircuit, gatekeeper, destination, true, out reason)) | 976 | if (m_UserAgentService.LoginAgentToGrid(null, aCircuit, gatekeeper, destination, true, out reason)) |
976 | return true; | 977 | return true; |
977 | return false; | 978 | return false; |