aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2011-05-01 09:30:23 -0700
committerDiva Canto2011-05-01 09:30:23 -0700
commitbbe41c75e17764a238f301bfdebdc095cc4a64cd (patch)
treed7c82ed2e4a275a5e0927c6b7664193e993156fc /OpenSim
parentIncreased Timeout to 30 secs. (diff)
downloadopensim-SC-bbe41c75e17764a238f301bfdebdc095cc4a64cd.zip
opensim-SC-bbe41c75e17764a238f301bfdebdc095cc4a64cd.tar.gz
opensim-SC-bbe41c75e17764a238f301bfdebdc095cc4a64cd.tar.bz2
opensim-SC-bbe41c75e17764a238f301bfdebdc095cc4a64cd.tar.xz
Fixed confusing OSDMap that comes as the response of QueryAccess in the case it fails.
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 7545db8..5cb8269 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -275,27 +275,30 @@ namespace OpenSim.Services.Connectors.Simulation
275 try 275 try
276 { 276 {
277 OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000); 277 OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000);
278 OSDMap data = (OSDMap)result["_Result"];
279
280 bool success = result["success"].AsBoolean(); 278 bool success = result["success"].AsBoolean();
281 reason = data["reason"].AsString(); 279 if (result.ContainsKey("_Result"))
282 if (data["version"] != null && data["version"].AsString() != string.Empty) 280 {
283 version = data["version"].AsString(); 281 OSDMap data = (OSDMap)result["_Result"];
284 282
285 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString()); 283 reason = data["reason"].AsString();
284 if (data["version"] != null && data["version"].AsString() != string.Empty)
285 version = data["version"].AsString();
286
287 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString());
288 }
286 289
287 if (!success) 290 if (!success)
288 { 291 {
289 if (data.ContainsKey("Message")) 292 if (result.ContainsKey("Message"))
290 { 293 {
291 string message = data["Message"].AsString(); 294 string message = result["Message"].AsString();
292 if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region 295 if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region
293 { 296 {
294 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"); 297 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");
295 return true; 298 return true;
296 } 299 }
297 300
298 reason = data["Message"]; 301 reason = result["Message"];
299 } 302 }
300 else 303 else
301 { 304 {