From 188d86998d14d23a59e345568add8ece7f5a0641 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 28 Jan 2011 04:09:04 +0000
Subject: Fix up QueryAccess to also check parcels
---
.../Connectors/Simulation/SimulationServiceConnector.cs | 10 +++++++---
OpenSim/Services/Interfaces/ISimulationService.cs | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 143c296..775bded 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -31,6 +31,7 @@ using System.IO;
using System.Net;
using System.Reflection;
using System.Text;
+using System.Collections;
using OpenSim.Framework;
using OpenSim.Services.Interfaces;
@@ -206,9 +207,9 @@ namespace OpenSim.Services.Connectors.Simulation
///
///
- public bool QueryAccess(GridRegion destination, UUID id)
+ public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
{
- // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start");
+ // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position);
IPEndPoint ext = destination.ExternalEndPoint;
if (ext == null) return false;
@@ -216,9 +217,12 @@ namespace OpenSim.Services.Connectors.Simulation
// Eventually, we want to use a caps url instead of the agentID
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
+ OSDMap request = new OSDMap();
+ request.Add("position", OSD.FromString(position.ToString()));
+
try
{
- OSDMap result = WebUtil.ServiceOSDRequest(uri,null,"QUERYACCESS",10000);
+ OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000);
return result["Success"].AsBoolean();
}
catch (Exception e)
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 12e8982..48a2185 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);
+ bool QueryAccess(GridRegion destination, UUID id, Vector3 position);
///
/// Message from receiving region to departing region, telling it got contacted by the client.
--
cgit v1.1