Fixed confusing OSDMap that comes as the response of QueryAccess in the case it fails.
parent
d4323dd753
commit
bbe41c75e1
|
@ -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);
|
||||||
|
bool success = result["success"].AsBoolean();
|
||||||
|
if (result.ContainsKey("_Result"))
|
||||||
|
{
|
||||||
OSDMap data = (OSDMap)result["_Result"];
|
OSDMap data = (OSDMap)result["_Result"];
|
||||||
|
|
||||||
bool success = result["success"].AsBoolean();
|
|
||||||
reason = data["reason"].AsString();
|
reason = data["reason"].AsString();
|
||||||
if (data["version"] != null && data["version"].AsString() != string.Empty)
|
if (data["version"] != null && data["version"].AsString() != string.Empty)
|
||||||
version = data["version"].AsString();
|
version = data["version"].AsString();
|
||||||
|
|
||||||
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, 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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue