diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 54 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 6 |
2 files changed, 32 insertions, 28 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a52e636..9ea92b0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -279,39 +279,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
279 | { | 279 | { |
280 | if (Math.Abs(otherRegion.RegionLocX - RegionInfo.RegionLocX) <= 1 || Math.Abs(otherRegion.RegionLocY - RegionInfo.RegionLocY) <= 1) | 280 | if (Math.Abs(otherRegion.RegionLocX - RegionInfo.RegionLocX) <= 1 || Math.Abs(otherRegion.RegionLocY - RegionInfo.RegionLocY) <= 1) |
281 | { | 281 | { |
282 | try | 282 | if (!(m_regionRestartNotifyList.Contains(otherRegion))) |
283 | { | ||
284 | |||
285 | ForEachScenePresence(delegate(ScenePresence agent) | ||
286 | { | ||
287 | if (!(agent.IsChildAgent)) | ||
288 | { | ||
289 | //agent.ControllingClient.new | ||
290 | //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); | ||
291 | InformClientOfNeighbor(agent, otherRegion); | ||
292 | } | ||
293 | } | ||
294 | |||
295 | ); | ||
296 | } | ||
297 | catch (System.NullReferenceException) | ||
298 | { | 283 | { |
299 | // This means that we're not booted up completely yet. | 284 | m_regionRestartNotifyList.Add(otherRegion); |
285 | |||
286 | m_restartWaitTimer.Interval= 50000; | ||
287 | m_restartWaitTimer.AutoReset = false; | ||
288 | m_restartWaitTimer.Elapsed += new ElapsedEventHandler(restart_Notify_Wait_Elapsed); | ||
289 | m_restartWaitTimer.Start(); | ||
300 | } | 290 | } |
301 | } | 291 | } |
302 | else | 292 | else |
303 | { | 293 | { |
304 | MainLog.Instance.Verbose("INTERGRID", "Got notice about Region at X:" + otherRegion.RegionLocX.ToString() + " Y:" + otherRegion.RegionLocY.ToString() + " but it was too far away to send to the client"); | 294 | MainLog.Instance.Verbose("INTERGRID", "Got notice about Region at X:" + otherRegion.RegionLocX.ToString() + " Y:" + otherRegion.RegionLocY.ToString() + " but it was too far away to send to the client"); |
305 | } | 295 | } |
306 | //if (!(m_regionRestartNotifyList.Contains(otherRegion))) | 296 | |
307 | //{ | ||
308 | //m_regionRestartNotifyList.Add(otherRegion); | ||
309 | |||
310 | //m_restartWaitTimer = new Timer(20000); | ||
311 | //m_restartWaitTimer.AutoReset = false; | ||
312 | // m_restartWaitTimer.Elapsed += new ElapsedEventHandler(restart_Notify_Wait_Elapsed); | ||
313 | //m_restartWaitTimer.Start(); | ||
314 | //} | ||
315 | } | 297 | } |
316 | return true; | 298 | return true; |
317 | } | 299 | } |
@@ -368,7 +350,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
368 | m_restartWaitTimer.Stop(); | 350 | m_restartWaitTimer.Stop(); |
369 | foreach (RegionInfo region in m_regionRestartNotifyList) | 351 | foreach (RegionInfo region in m_regionRestartNotifyList) |
370 | { | 352 | { |
371 | 353 | try | |
354 | { | ||
355 | |||
356 | ForEachScenePresence(delegate(ScenePresence agent) | ||
357 | { | ||
358 | if (!(agent.IsChildAgent)) | ||
359 | { | ||
360 | //agent.ControllingClient.new | ||
361 | //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); | ||
362 | InformClientOfNeighbor(agent, region); | ||
363 | } | ||
364 | } | ||
365 | |||
366 | ); | ||
367 | } | ||
368 | catch (System.NullReferenceException) | ||
369 | { | ||
370 | // This means that we're not booted up completely yet. | ||
371 | } | ||
372 | } | 372 | } |
373 | // Reset list to nothing. | 373 | // Reset list to nothing. |
374 | m_regionRestartNotifyList = new List<RegionInfo>(); | 374 | m_regionRestartNotifyList = new List<RegionInfo>(); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 905764d..0923010 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -251,7 +251,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
251 | { | 251 | { |
252 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); | 252 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); |
253 | 253 | ||
254 | List<SimpleRegionInfo> neighbours = m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); | 254 | |
255 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); | ||
256 | |||
257 | neighbours = m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); | ||
255 | if (neighbours != null) | 258 | if (neighbours != null) |
256 | { | 259 | { |
257 | for (int i = 0; i < neighbours.Count; i++) | 260 | for (int i = 0; i < neighbours.Count; i++) |
@@ -264,6 +267,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
264 | d); | 267 | d); |
265 | } | 268 | } |
266 | } | 269 | } |
270 | |||
267 | //bool val = m_commsProvider.InterRegion.RegionUp(new SearializableRegionInfo(region)); | 271 | //bool val = m_commsProvider.InterRegion.RegionUp(new SearializableRegionInfo(region)); |
268 | } | 272 | } |
269 | 273 | ||