From 918c12c965e822457807563acd4e16638a6bd3cc Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 16 Feb 2011 08:06:11 +0000
Subject: Change the QUERYACCESS method to eliminate spurious access denied
messages
---
.../Connectors/Simulation/SimulationServiceConnector.cs | 17 ++++++++++++++++-
OpenSim/Services/Interfaces/ISimulationService.cs | 2 +-
2 files changed, 17 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index cc6bffb..f6ee493 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -256,8 +256,10 @@ namespace OpenSim.Services.Connectors.Simulation
///
///
- public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
+ public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
{
+ reason = "Failed to contact destination";
+
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position);
IPEndPoint ext = destination.ExternalEndPoint;
@@ -283,8 +285,21 @@ namespace OpenSim.Services.Connectors.Simulation
m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored");
return true;
}
+
+ reason = result["Message"];
+ }
+ else
+ {
+ reason = "Communications failure";
}
+
+ return false;
}
+
+ OSDMap resp = (OSDMap)result["_Result"];
+ success = resp["success"].AsBoolean();
+ reason = resp["reason"].AsString();
+
return success;
}
catch (Exception e)
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 48a2185..b796757 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Services.Interfaces
bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent);
- bool QueryAccess(GridRegion destination, UUID id, Vector3 position);
+ bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason);
///
/// Message from receiving region to departing region, telling it got contacted by the client.
--
cgit v1.1