diff options
author | Diva Canto | 2010-01-07 15:53:55 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-07 15:53:55 -0800 |
commit | f11a97f12d328af8bb39b92fec5cb5780983b66a (patch) | |
tree | 00f96f853b91e105786b416dd18f2c76e56fd1fd /OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation | |
parent | Merge branch 'master' into presence-refactor (diff) | |
download | opensim-SC_OLD-f11a97f12d328af8bb39b92fec5cb5780983b66a.zip opensim-SC_OLD-f11a97f12d328af8bb39b92fec5cb5780983b66a.tar.gz opensim-SC_OLD-f11a97f12d328af8bb39b92fec5cb5780983b66a.tar.bz2 opensim-SC_OLD-f11a97f12d328af8bb39b92fec5cb5780983b66a.tar.xz |
* Finished SimulationServiceConnector
* Started rerouting calls to UserService.
* Compiles. May run.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | 11 |
2 files changed, 16 insertions, 14 deletions
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 | |||
172 | { | 172 | { |
173 | if (s.RegionInfo.RegionHandle == destination.RegionHandle) | 173 | if (s.RegionInfo.RegionHandle == destination.RegionHandle) |
174 | { | 174 | { |
175 | // m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle); | 175 | m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", destination.RegionName); |
176 | return s.NewUserConnection(aCircuit, teleportFlags, out reason); | 176 | return s.NewUserConnection(aCircuit, teleportFlags, out reason); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | 179 | ||
180 | // m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle); | 180 | m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", destination.RegionName); |
181 | reason = "Did not find region " + destination.RegionName; | 181 | reason = "Did not find region " + destination.RegionName; |
182 | return false; | 182 | return false; |
183 | } | 183 | } |
@@ -241,14 +241,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
241 | return false; | 241 | return false; |
242 | } | 242 | } |
243 | 243 | ||
244 | public bool ReleaseAgent(GridRegion destination, UUID id, string uri) | 244 | public bool ReleaseAgent(UUID origin, UUID id, string uri) |
245 | { | 245 | { |
246 | if (destination == null) | ||
247 | return false; | ||
248 | |||
249 | foreach (Scene s in m_sceneList) | 246 | foreach (Scene s in m_sceneList) |
250 | { | 247 | { |
251 | if (s.RegionInfo.RegionHandle == destination.RegionHandle) | 248 | if (s.RegionInfo.RegionID == origin) |
252 | { | 249 | { |
253 | //m_log.Debug("[LOCAL COMMS]: Found region to SendReleaseAgent"); | 250 | //m_log.Debug("[LOCAL COMMS]: Found region to SendReleaseAgent"); |
254 | return s.IncomingReleaseAgent(id); | 251 | return s.IncomingReleaseAgent(id); |
@@ -334,6 +331,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
334 | return false; | 331 | return false; |
335 | } | 332 | } |
336 | 333 | ||
334 | public bool IsLocalRegion(UUID id) | ||
335 | { | ||
336 | foreach (Scene s in m_sceneList) | ||
337 | if (s.RegionInfo.RegionID == id) | ||
338 | return true; | ||
339 | return false; | ||
340 | } | ||
341 | |||
337 | #endregion | 342 | #endregion |
338 | } | 343 | } |
339 | } | 344 | } |
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 | |||
245 | 245 | ||
246 | } | 246 | } |
247 | 247 | ||
248 | public bool ReleaseAgent(GridRegion destination, UUID id, string uri) | 248 | public bool ReleaseAgent(UUID origin, UUID id, string uri) |
249 | { | 249 | { |
250 | if (destination == null) | ||
251 | return false; | ||
252 | |||
253 | // Try local first | 250 | // Try local first |
254 | if (m_localBackend.ReleaseAgent(destination, id, uri)) | 251 | if (m_localBackend.ReleaseAgent(origin, id, uri)) |
255 | return true; | 252 | return true; |
256 | 253 | ||
257 | // else do the remote thing | 254 | // else do the remote thing |
258 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) | 255 | if (!m_localBackend.IsLocalRegion(origin)) |
259 | return m_remoteConnector.ReleaseAgent(destination, id, uri); | 256 | return m_remoteConnector.ReleaseAgent(origin, id, uri); |
260 | 257 | ||
261 | return false; | 258 | return false; |
262 | } | 259 | } |