From 4df1d25d23d76ee3ae8c7da155462b57735f6418 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 9 Dec 2010 01:55:32 +0000 Subject: Plumb a code path for the entity transfer module to ask a destination scene whether or not an agent is allowed there as a root agent. --- .../Simulation/LocalSimulationConnector.cs | 17 +++++++++++++++++ .../Simulation/RemoteSimulationConnector.cs | 17 +++++++++++++++++ OpenSim/Region/Framework/Scenes/Scene.cs | 11 +++++++++++ 3 files changed, 45 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index e32dbb3..37b403e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -257,6 +257,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation return false; } + public bool QueryAccess(GridRegion destination, UUID id) + { + if (destination == null) + return false; + + foreach (Scene s in m_sceneList) + { + if (s.RegionInfo.RegionHandle == destination.RegionHandle) + { + //m_log.Debug("[LOCAL COMMS]: Found region to send QueryAccess"); + return s.QueryAccess(id); + } + } + //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); + return false; + } + public bool ReleaseAgent(UUID origin, UUID id, string uri) { foreach (Scene s in m_sceneList) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 3f577f2..387a9b8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs @@ -239,6 +239,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation } + public bool QueryAccess(GridRegion destination, UUID id) + { + if (destination == null) + return false; + + // Try local first + if (m_localBackend.QueryAccess(destination, id)) + return true; + + // else do the remote thing + if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) + return m_remoteConnector.QueryAccess(destination, id); + + return false; + + } + public bool ReleaseAgent(UUID origin, UUID id, string uri) { // Try local first diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6d72154..de75375 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4953,5 +4953,16 @@ namespace OpenSim.Region.Framework.Scenes DeleteSceneObject(grp, true); } } + + // This method is called across the simulation connector to + // determine if a given agent is allowed in this region + // AS A ROOT AGENT. Returning false here will prevent them + // from logging into the region, teleporting into the region + // or corssing the broder walking, but will NOT prevent + // child agent creation, thereby emulating the SL behavior. + public bool QueryAccess(UUID agentID) + { + return true; + } } } -- cgit v1.1