Change the QUERYACCESS method to eliminate spurious access denied messages

This commit is contained in:
Melanie
2011-02-16 05:22:05 +01:00
parent ccd6e5d071
commit cfce0aa448
7 changed files with 42 additions and 16 deletions

View File

@@ -256,8 +256,10 @@ namespace OpenSim.Services.Connectors.Simulation
/// <summary>
/// </summary>
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
{
reason = "Failed to contact destination";
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position);
IPEndPoint ext = destination.ExternalEndPoint;
@@ -283,8 +285,21 @@ namespace OpenSim.Services.Connectors.Simulation
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;
}
reason = result["Message"];
}
else
{
reason = "Communications failure";
}
return false;
}
OSDMap resp = (OSDMap)result["_Result"];
success = resp["success"].AsBoolean();
reason = resp["reason"].AsString();
return success;
}
catch (Exception e)