aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMelanie2011-11-17 19:15:41 +0100
committerMelanie2011-11-17 19:15:41 +0100
commitd1c80efd41d914ed91a51d129e8f08ad749e3397 (patch)
tree61aa8dbef7e0afa3f3a2c2eaa7f3ae3d4d8ef712 /OpenSim/Region/Framework/Scenes/Scene.cs
parentForce a sim exit when hearbeat isn't restarting successfully (diff)
parentMerge branch 'master' into bigmerge (diff)
downloadopensim-SC-d1c80efd41d914ed91a51d129e8f08ad749e3397.zip
opensim-SC-d1c80efd41d914ed91a51d129e8f08ad749e3397.tar.gz
opensim-SC-d1c80efd41d914ed91a51d129e8f08ad749e3397.tar.bz2
opensim-SC-d1c80efd41d914ed91a51d129e8f08ad749e3397.tar.xz
Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs49
1 files changed, 8 insertions, 41 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 876dfb2..b6067ea 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1148,8 +1148,8 @@ namespace OpenSim.Region.Framework.Scenes
1148 1148
1149 m_sceneGraph.Close(); 1149 m_sceneGraph.Close();
1150 1150
1151 // De-register with region communications (events cleanup) 1151 if (!GridService.DeregisterRegion(m_regInfo.RegionID))
1152 UnRegisterRegionWithComms(); 1152 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
1153 1153
1154 // call the base class Close method. 1154 // call the base class Close method.
1155 base.Close(); 1155 base.Close();
@@ -1177,7 +1177,9 @@ namespace OpenSim.Region.Framework.Scenes
1177 } 1177 }
1178 m_lastUpdate = Util.EnvironmentTickCount(); 1178 m_lastUpdate = Util.EnvironmentTickCount();
1179 1179
1180 HeartbeatThread = Watchdog.StartThread(Heartbeat, "Heartbeat for region " + RegionInfo.RegionName, ThreadPriority.Normal, false); 1180 HeartbeatThread
1181 = Watchdog.StartThread(
1182 Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false);
1181 } 1183 }
1182 1184
1183 /// <summary> 1185 /// <summary>
@@ -1663,8 +1665,6 @@ namespace OpenSim.Region.Framework.Scenes
1663 /// <exception cref="System.Exception">Thrown if registration of the region itself fails.</exception> 1665 /// <exception cref="System.Exception">Thrown if registration of the region itself fails.</exception>
1664 public void RegisterRegionWithGrid() 1666 public void RegisterRegionWithGrid()
1665 { 1667 {
1666 RegisterCommsEvents();
1667
1668 m_sceneGridService.SetScene(this); 1668 m_sceneGridService.SetScene(this);
1669 1669
1670 GridRegion region = new GridRegion(RegionInfo); 1670 GridRegion region = new GridRegion(RegionInfo);
@@ -2665,11 +2665,12 @@ namespace OpenSim.Region.Framework.Scenes
2665 // Send all scene object to the new client 2665 // Send all scene object to the new client
2666 Util.FireAndForget(delegate 2666 Util.FireAndForget(delegate
2667 { 2667 {
2668 Entities.ForEach(delegate(EntityBase e) 2668 EntityBase[] entities = Entities.GetEntities();
2669 foreach(EntityBase e in entities)
2669 { 2670 {
2670 if (e != null && e is SceneObjectGroup) 2671 if (e != null && e is SceneObjectGroup)
2671 ((SceneObjectGroup)e).SendFullUpdateToClient(client); 2672 ((SceneObjectGroup)e).SendFullUpdateToClient(client);
2672 }); 2673 }
2673 }); 2674 });
2674 } 2675 }
2675 2676
@@ -3332,40 +3333,6 @@ namespace OpenSim.Region.Framework.Scenes
3332 #region RegionComms 3333 #region RegionComms
3333 3334
3334 /// <summary> 3335 /// <summary>
3335 /// Register the methods that should be invoked when this scene receives various incoming events
3336 /// </summary>
3337 public void RegisterCommsEvents()
3338 {
3339 m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing;
3340 m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent;
3341 //m_eventManager.OnRegionUp += OtherRegionUp;
3342 //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
3343 //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar;
3344 m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
3345 m_sceneGridService.OnGetLandData += GetLandData;
3346 }
3347
3348 /// <summary>
3349 /// Deregister this scene from receiving incoming region events
3350 /// </summary>
3351 public void UnRegisterRegionWithComms()
3352 {
3353 m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid;
3354 //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
3355 //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
3356 //m_eventManager.OnRegionUp -= OtherRegionUp;
3357 m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing;
3358 m_sceneGridService.OnCloseAgentConnection -= IncomingCloseAgent;
3359 m_sceneGridService.OnGetLandData -= GetLandData;
3360
3361 // this does nothing; should be removed
3362 m_sceneGridService.Close();
3363
3364 if (!GridService.DeregisterRegion(m_regInfo.RegionID))
3365 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
3366 }
3367
3368 /// <summary>
3369 /// Do the work necessary to initiate a new user connection for a particular scene. 3336 /// Do the work necessary to initiate a new user connection for a particular scene.
3370 /// At the moment, this consists of setting up the caps infrastructure 3337 /// At the moment, this consists of setting up the caps infrastructure
3371 /// The return bool should allow for connections to be refused, but as not all calling paths 3338 /// The return bool should allow for connections to be refused, but as not all calling paths