Merge branch 'master' into caps

bulletsim
Diva Canto 2011-05-01 09:31:26 -07:00
commit 8cc9d22b89
1 changed files with 12 additions and 9 deletions

View File

@ -275,27 +275,30 @@ namespace OpenSim.Services.Connectors.Simulation
try try
{ {
OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000); OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000);
OSDMap data = (OSDMap)result["_Result"];
bool success = result["success"].AsBoolean(); bool success = result["success"].AsBoolean();
reason = data["reason"].AsString(); if (result.ContainsKey("_Result"))
if (data["version"] != null && data["version"].AsString() != string.Empty) {
version = data["version"].AsString(); OSDMap data = (OSDMap)result["_Result"];
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString()); reason = data["reason"].AsString();
if (data["version"] != null && data["version"].AsString() != string.Empty)
version = data["version"].AsString();
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString());
}
if (!success) if (!success)
{ {
if (data.ContainsKey("Message")) if (result.ContainsKey("Message"))
{ {
string message = data["Message"].AsString(); string message = result["Message"].AsString();
if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region
{ {
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"); 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; return true;
} }
reason = data["Message"]; reason = result["Message"];
} }
else else
{ {