diff options
author | BlueWall | 2011-02-09 14:45:40 -0500 |
---|---|---|
committer | BlueWall | 2011-02-09 14:45:40 -0500 |
commit | 0f736e5601a738b4da435b392774ba211647da9c (patch) | |
tree | edb1f9d90c01841eea86b2ce0b2fbf410dc416ee /OpenSim/Services/Connectors | |
parent | Merge branch 'master' of /home/opensim/src/OpenSim/Core (diff) | |
parent | Flash out the prim count module (diff) | |
download | opensim-SC_OLD-0f736e5601a738b4da435b392774ba211647da9c.zip opensim-SC_OLD-0f736e5601a738b4da435b392774ba211647da9c.tar.gz opensim-SC_OLD-0f736e5601a738b4da435b392774ba211647da9c.tar.bz2 opensim-SC_OLD-0f736e5601a738b4da435b392774ba211647da9c.tar.xz |
Merge branch 'master' of /home/opensim/src/OpenSim/Core
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 143c296..c5313fc 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -31,6 +31,7 @@ using System.IO; | |||
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Text; | 33 | using System.Text; |
34 | using System.Collections; | ||
34 | 35 | ||
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
36 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
@@ -206,9 +207,9 @@ namespace OpenSim.Services.Connectors.Simulation | |||
206 | 207 | ||
207 | /// <summary> | 208 | /// <summary> |
208 | /// </summary> | 209 | /// </summary> |
209 | public bool QueryAccess(GridRegion destination, UUID id) | 210 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position) |
210 | { | 211 | { |
211 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start"); | 212 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position); |
212 | 213 | ||
213 | IPEndPoint ext = destination.ExternalEndPoint; | 214 | IPEndPoint ext = destination.ExternalEndPoint; |
214 | if (ext == null) return false; | 215 | if (ext == null) return false; |
@@ -216,10 +217,26 @@ namespace OpenSim.Services.Connectors.Simulation | |||
216 | // Eventually, we want to use a caps url instead of the agentID | 217 | // Eventually, we want to use a caps url instead of the agentID |
217 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; | 218 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; |
218 | 219 | ||
220 | OSDMap request = new OSDMap(); | ||
221 | request.Add("position", OSD.FromString(position.ToString())); | ||
222 | |||
219 | try | 223 | try |
220 | { | 224 | { |
221 | OSDMap result = WebUtil.ServiceOSDRequest(uri,null,"QUERYACCESS",10000); | 225 | OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000); |
222 | return result["Success"].AsBoolean(); | 226 | bool success = result["Success"].AsBoolean(); |
227 | if (!success) | ||
228 | { | ||
229 | if (result.ContainsKey("Message")) | ||
230 | { | ||
231 | string message = result["Message"].AsString(); | ||
232 | if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region | ||
233 | { | ||
234 | 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"); | ||
235 | return true; | ||
236 | } | ||
237 | } | ||
238 | } | ||
239 | return success; | ||
223 | } | 240 | } |
224 | catch (Exception e) | 241 | catch (Exception e) |
225 | { | 242 | { |