diff options
author | Justin Clarke Casey | 2008-09-06 01:10:47 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-09-06 01:10:47 +0000 |
commit | 03581c17e61dc7be91a364f40e5f2bcd0abb2fc7 (patch) | |
tree | adc1db11218ae924efc0d8c6ac500b8aefc2dabe /OpenSim/Region | |
parent | reformatted some of unit test standards to allow them to work when OpenSim is... (diff) | |
download | opensim-SC_OLD-03581c17e61dc7be91a364f40e5f2bcd0abb2fc7.zip opensim-SC_OLD-03581c17e61dc7be91a364f40e5f2bcd0abb2fc7.tar.gz opensim-SC_OLD-03581c17e61dc7be91a364f40e5f2bcd0abb2fc7.tar.bz2 opensim-SC_OLD-03581c17e61dc7be91a364f40e5f2bcd0abb2fc7.tar.xz |
* refactor: Make SOG itself responsible for checking whether it's already been deleted on an update request from the regular sweep
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 7 |
2 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 51ee4d0..658478d 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -141,9 +141,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
141 | List<EntityBase> updateEntities = GetEntities(); | 141 | List<EntityBase> updateEntities = GetEntities(); |
142 | 142 | ||
143 | foreach (EntityBase entity in updateEntities) | 143 | foreach (EntityBase entity in updateEntities) |
144 | { | 144 | { |
145 | if (!entity.IsDeleted) | 145 | entity.Update(); |
146 | entity.Update(); | ||
147 | } | 146 | } |
148 | } | 147 | } |
149 | 148 | ||
@@ -327,15 +326,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
327 | // Don't abort the whole update if one entity happens to give us an exception. | 326 | // Don't abort the whole update if one entity happens to give us an exception. |
328 | try | 327 | try |
329 | { | 328 | { |
330 | // Check that the group was not deleted before the scheduled update | 329 | m_updateList[i].Update(); |
331 | // FIXME: This is merely a temporary measure to reduce the incidence of failure, when | ||
332 | // an object has been deleted from a scene before update was processed. | ||
333 | // A more fundamental overhaul of the update mechanism is required to eliminate all | ||
334 | // the race conditions. | ||
335 | if (!entity.IsDeleted) | ||
336 | { | ||
337 | m_updateList[i].Update(); | ||
338 | } | ||
339 | } | 330 | } |
340 | catch (Exception e) | 331 | catch (Exception e) |
341 | { | 332 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 52b9bc1..b04e882 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1478,6 +1478,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1478 | /// </summary> | 1478 | /// </summary> |
1479 | public override void Update() | 1479 | public override void Update() |
1480 | { | 1480 | { |
1481 | // Check that the group was not deleted before the scheduled update | ||
1482 | // FIXME: This is merely a temporary measure to reduce the incidence of failure when | ||
1483 | // an object has been deleted from a scene before update was processed. | ||
1484 | // A more fundamental overhaul of the update mechanism is required to eliminate all | ||
1485 | // the race conditions. | ||
1486 | if (m_isDeleted) | ||
1487 | return; | ||
1481 | 1488 | ||
1482 | lock (m_parts) | 1489 | lock (m_parts) |
1483 | { | 1490 | { |