From d58743ddc18032e9468926990fc888a7719c0813 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 3 Aug 2012 01:30:05 +0200 Subject: [PATCH 1/2] Add a reason message for a code path that lacks one --- .../Services/Connectors/Simulation/SimulationServiceConnector.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index cd9338660b..e1c2243316 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -86,6 +86,7 @@ namespace OpenSim.Services.Connectors.Simulation reason = String.Empty; if (destination == null) { + reason = "Destination not found"; m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null"); return false; } From 3460319f1e4eab5529df83f9c873a14df414d525 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 3 Aug 2012 02:20:57 +0200 Subject: [PATCH 2/2] Make sure the position of a loggin-in agent is within region boundaries since out of bounds positions cause a rejection of the login. --- OpenSim/Region/Framework/Scenes/Scene.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3a28d42092..bf2db58b36 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3886,6 +3886,15 @@ namespace OpenSim.Region.Framework.Scenes public bool TestLandRestrictions(UUID agentID, out string reason, ref float posX, ref float posY) { + if (posX < 0) + posX = 0; + else if (posX >= 256) + posX = 255.999f; + if (posY < 0) + posY = 0; + else if (posY >= 256) + posY = 255.999f; + reason = String.Empty; if (Permissions.IsGod(agentID)) return true;