mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -41,6 +41,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
public class LocalSimulationConnectorModule : ISharedRegionModule, ISimulationService
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// Version of this service
|
||||
private const string m_Version = "SIMULATION/0.1";
|
||||
|
||||
private List<Scene> m_sceneList = new List<Scene>();
|
||||
|
||||
private IEntityTransferModule m_AgentTransferModule;
|
||||
@@ -257,9 +260,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason)
|
||||
{
|
||||
reason = "Communications failure";
|
||||
version = m_Version;
|
||||
if (destination == null)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -229,19 +229,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason)
|
||||
{
|
||||
reason = "Communications failure";
|
||||
version = "Unknown";
|
||||
if (destination == null)
|
||||
return false;
|
||||
|
||||
// Try local first
|
||||
if (m_localBackend.QueryAccess(destination, id, position, out reason))
|
||||
if (m_localBackend.QueryAccess(destination, id, position, out version, out reason))
|
||||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
|
||||
return m_remoteConnector.QueryAccess(destination, id, position, out reason);
|
||||
return m_remoteConnector.QueryAccess(destination, id, position, out version, out reason);
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user