aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-24 01:00:18 +0100
committerJustin Clark-Casey (justincc)2012-05-24 01:00:18 +0100
commit38ce9d45a523db277d3eb4d3ed310b7cd9ca6b43 (patch)
tree826a9d52e428bc3b792e7b80019dd39b5c5c6a24 /OpenSim/Region/CoreModules/ServiceConnectorsOut
parentIf an agent is still registered as 'in transit' by the source region, don't a... (diff)
downloadopensim-SC_OLD-38ce9d45a523db277d3eb4d3ed310b7cd9ca6b43.zip
opensim-SC_OLD-38ce9d45a523db277d3eb4d3ed310b7cd9ca6b43.tar.gz
opensim-SC_OLD-38ce9d45a523db277d3eb4d3ed310b7cd9ca6b43.tar.bz2
opensim-SC_OLD-38ce9d45a523db277d3eb4d3ed310b7cd9ca6b43.tar.xz
Make ISimulationScene.GetScene() used the more efficient region id for lookup rather than the region handle.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs20
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs4
2 files changed, 16 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 270daad..026c6c8 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -160,16 +160,24 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
160 160
161 #region ISimulation 161 #region ISimulation
162 162
163 public IScene GetScene(ulong regionhandle) 163 public IScene GetScene(UUID regionId)
164 { 164 {
165 foreach (Scene s in m_scenes.Values) 165 if (m_scenes.ContainsKey(regionId))
166 { 166 {
167 if (s.RegionInfo.RegionHandle == regionhandle) 167 return m_scenes[regionId];
168 return s;
169 } 168 }
169 else
170 {
171 // FIXME: This was pre-existing behaviour but possibly not a good idea, since it hides an error rather
172 // than making it obvious and fixable. Need to see if the error message comes up in practice.
173 Scene s = m_scenes.Values.ToArray()[0];
170 174
171 // ? weird. should not happen 175 m_log.ErrorFormat(
172 return m_scenes.Values.ToArray()[0]; 176 "[LOCAL SIMULATION CONNECTOR]: Region with id {0} not found. Returning {1} {2} instead",
177 regionId, s.RegionInfo.RegionName, s.RegionInfo.RegionID);
178
179 return s;
180 }
173 } 181 }
174 182
175 public ISimulationService GetInnerService() 183 public ISimulationService GetInnerService()
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index eaf9506..3d28518 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -151,9 +151,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
151 151
152 #region IInterregionComms 152 #region IInterregionComms
153 153
154 public IScene GetScene(ulong handle) 154 public IScene GetScene(UUID regionId)
155 { 155 {
156 return m_localBackend.GetScene(handle); 156 return m_localBackend.GetScene(regionId);
157 } 157 }
158 158
159 public ISimulationService GetInnerService() 159 public ISimulationService GetInnerService()