aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-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()