aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-22 19:44:46 +0000
committerTeravus Ovares2008-02-22 19:44:46 +0000
commit582964800cc30e5ad08cf3be9a6a49fa96dd8b68 (patch)
tree02ef3aff1bfcbc3bca0d89663396f35e2963ca0a /OpenSim/Region/Environment/Scenes
parent* Moved the EventManager over to delegate instances to prevent race conditions. (diff)
downloadopensim-SC-582964800cc30e5ad08cf3be9a6a49fa96dd8b68.zip
opensim-SC-582964800cc30e5ad08cf3be9a6a49fa96dd8b68.tar.gz
opensim-SC-582964800cc30e5ad08cf3be9a6a49fa96dd8b68.tar.bz2
opensim-SC-582964800cc30e5ad08cf3be9a6a49fa96dd8b68.tar.xz
* Moved all events except gridcomms and regioncomms over to Event Delegate instances to prevent event race conditions
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs7
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs7
5 files changed, 21 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 38bcb03..fea6b2b 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -47,6 +47,7 @@ namespace OpenSim.Region.Environment.Scenes
47 #region Events 47 #region Events
48 48
49 public event PhysicsCrash UnRecoverableError; 49 public event PhysicsCrash UnRecoverableError;
50 private PhysicsCrash handler001 = null;
50 51
51 #endregion 52 #endregion
52 53
@@ -715,9 +716,10 @@ namespace OpenSim.Region.Environment.Scenes
715 716
716 public void physicsBasedCrash() 717 public void physicsBasedCrash()
717 { 718 {
718 if (UnRecoverableError != null) 719 handler001 = UnRecoverableError;
720 if (handler001 != null)
719 { 721 {
720 UnRecoverableError(); 722 handler001();
721 } 723 }
722 } 724 }
723 725
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 4e05682..3371912 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -160,7 +160,9 @@ namespace OpenSim.Region.Environment.Scenes
160 public virtual void Restart(int seconds) 160 public virtual void Restart(int seconds)
161 { 161 {
162 m_log.Error("[REGION]: passing Restart Message up the namespace"); 162 m_log.Error("[REGION]: passing Restart Message up the namespace");
163 OnRestart(RegionInfo); 163 restart handler001 = OnRestart;
164 if (handler001 != null)
165 handler001(RegionInfo);
164 } 166 }
165 167
166 public virtual bool PresenceChildStatus(LLUUID avatarID) 168 public virtual bool PresenceChildStatus(LLUUID avatarID)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2e4135c..8fd9edb 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -54,6 +54,7 @@ namespace OpenSim.Region.Environment.Scenes
54 protected ulong m_regionHandle; 54 protected ulong m_regionHandle;
55 55
56 public event PrimCountTaintedDelegate OnPrimCountTainted; 56 public event PrimCountTaintedDelegate OnPrimCountTainted;
57 private PrimCountTaintedDelegate handler001 = null;
57 58
58 /// <summary> 59 /// <summary>
59 /// Signal whether the non-inventory attributes of any prims in the group have changed 60 /// Signal whether the non-inventory attributes of any prims in the group have changed
@@ -1525,9 +1526,10 @@ namespace OpenSim.Region.Environment.Scenes
1525 /// </summary> 1526 /// </summary>
1526 public void TriggerTainted() 1527 public void TriggerTainted()
1527 { 1528 {
1528 if (OnPrimCountTainted != null) 1529 handler001 = OnPrimCountTainted;
1530 if (handler001 != null)
1529 { 1531 {
1530 OnPrimCountTainted(); 1532 handler001();
1531 } 1533 }
1532 } 1534 }
1533 1535
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 2d01282..9b80444 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -116,6 +116,8 @@ namespace OpenSim.Region.Environment.Scenes
116 private readonly List<ulong> m_knownChildRegions = new List<ulong>(); 116 private readonly List<ulong> m_knownChildRegions = new List<ulong>();
117 //neighbouring regions we have enabled a child agent in 117 //neighbouring regions we have enabled a child agent in
118 118
119 private SignificantClientMovement handler001 = null; //OnSignificantClientMovement;
120
119 121
120 /// <summary> 122 /// <summary>
121 /// Implemented Control Flags 123 /// Implemented Control Flags
@@ -1482,9 +1484,10 @@ namespace OpenSim.Region.Environment.Scenes
1482 if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5) 1484 if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5)
1483 { 1485 {
1484 posLastSignificantMove = AbsolutePosition; 1486 posLastSignificantMove = AbsolutePosition;
1485 if (OnSignificantClientMovement != null) 1487
1488 if (handler001 != null)
1486 { 1489 {
1487 OnSignificantClientMovement(m_controllingClient); 1490 handler001(m_controllingClient);
1488 m_scene.NotifyMyCoarseLocationChange(); 1491 m_scene.NotifyMyCoarseLocationChange();
1489 } 1492 }
1490 } 1493 }
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index 90e09b0..d4868f3 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Scenes
39 39
40 public event SendStatResult OnSendStatsResult; 40 public event SendStatResult OnSendStatsResult;
41 41
42 private SendStatResult handler001 = null;
43
42 private enum Stats : uint 44 private enum Stats : uint
43 { 45 {
44 TimeDilation = 0, 46 TimeDilation = 0,
@@ -245,9 +247,10 @@ namespace OpenSim.Region.Environment.Scenes
245 247
246 statpack.Stat = sb; 248 statpack.Stat = sb;
247 249
248 if (OnSendStatsResult != null) 250 handler001 = OnSendStatsResult;
251 if (handler001 != null)
249 { 252 {
250 OnSendStatsResult(statpack); 253 handler001(statpack);
251 } 254 }
252 resetvalues(); 255 resetvalues();
253 m_report.Enabled = true; 256 m_report.Enabled = true;