From f11a97f12d328af8bb39b92fec5cb5780983b66a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 7 Jan 2010 15:53:55 -0800 Subject: * Finished SimulationServiceConnector * Started rerouting calls to UserService. * Compiles. May run. --- .../Simulation/LocalSimulationConnector.cs | 19 ++++++++++++------- .../Simulation/RemoteSimulationConnector.cs | 11 ++++------- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 074bfb5..c6c6af0 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -172,12 +172,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation { if (s.RegionInfo.RegionHandle == destination.RegionHandle) { -// m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle); + m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", destination.RegionName); return s.NewUserConnection(aCircuit, teleportFlags, out reason); } } -// m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle); + m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", destination.RegionName); reason = "Did not find region " + destination.RegionName; return false; } @@ -241,14 +241,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation return false; } - public bool ReleaseAgent(GridRegion destination, UUID id, string uri) + public bool ReleaseAgent(UUID origin, UUID id, string uri) { - if (destination == null) - return false; - foreach (Scene s in m_sceneList) { - if (s.RegionInfo.RegionHandle == destination.RegionHandle) + if (s.RegionInfo.RegionID == origin) { //m_log.Debug("[LOCAL COMMS]: Found region to SendReleaseAgent"); return s.IncomingReleaseAgent(id); @@ -334,6 +331,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation return false; } + public bool IsLocalRegion(UUID id) + { + foreach (Scene s in m_sceneList) + if (s.RegionInfo.RegionID == id) + return true; + return false; + } + #endregion } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index c9cc368..f485cd1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs @@ -245,18 +245,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation } - public bool ReleaseAgent(GridRegion destination, UUID id, string uri) + public bool ReleaseAgent(UUID origin, UUID id, string uri) { - if (destination == null) - return false; - // Try local first - if (m_localBackend.ReleaseAgent(destination, id, uri)) + if (m_localBackend.ReleaseAgent(origin, id, uri)) return true; // else do the remote thing - if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) - return m_remoteConnector.ReleaseAgent(destination, id, uri); + if (!m_localBackend.IsLocalRegion(origin)) + return m_remoteConnector.ReleaseAgent(origin, id, uri); return false; } -- cgit v1.1