mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Change the QUERYACCESS method to eliminate spurious access denied messages
This commit is contained in:
@@ -257,15 +257,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
|
||||
{
|
||||
reason = "Communications failure";
|
||||
if (destination == null)
|
||||
return false;
|
||||
|
||||
foreach (Scene s in m_sceneList)
|
||||
{
|
||||
if (s.RegionInfo.RegionID == destination.RegionID)
|
||||
return s.QueryAccess(id, position);
|
||||
return s.QueryAccess(id, position, out reason);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -239,18 +239,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
|
||||
{
|
||||
reason = "Communications failure";
|
||||
if (destination == null)
|
||||
return false;
|
||||
|
||||
// Try local first
|
||||
if (m_localBackend.QueryAccess(destination, id, position))
|
||||
if (m_localBackend.QueryAccess(destination, id, position, out reason))
|
||||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
|
||||
return m_remoteConnector.QueryAccess(destination, id, position);
|
||||
return m_remoteConnector.QueryAccess(destination, id, position, out reason);
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user