aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Estate
diff options
context:
space:
mode:
authorDan Lake2010-03-17 06:40:00 -0700
committerJohn Hurliman2010-03-17 11:21:27 -0700
commit73e9b0be725a73a489b29f3fe2df236c897ef3b5 (patch)
tree0d039d61d327e98ed22e4bce30de65c24fc5780d /OpenSim/Region/CoreModules/World/Estate
parentminor logging changes to BaseHttpServer, OSHttpRequest (diff)
downloadopensim-SC_OLD-73e9b0be725a73a489b29f3fe2df236c897ef3b5.zip
opensim-SC_OLD-73e9b0be725a73a489b29f3fe2df236c897ef3b5.tar.gz
opensim-SC_OLD-73e9b0be725a73a489b29f3fe2df236c897ef3b5.tar.bz2
opensim-SC_OLD-73e9b0be725a73a489b29f3fe2df236c897ef3b5.tar.xz
Inconsistent locking of ScenePresence array in SceneGraph. Fixed by eliminating option to return the actual list. Callers can now either request a copy of the array as a new List or ask the SceneGraph to call a delegate function on every ScenePresence. Iteration and locking of the ScenePresences now takes place only within the SceneGraph class.
This patch also applies a fix to Combat/CombatModule.cs which had unlocked iteration of the ScenePresences and inconsistent try/catch around the use of those ScenePresences.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index e3bab2d..464d922 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -469,12 +469,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
469 private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID) 469 private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID)
470 { 470 {
471 // Get a fresh list that will not change as people get teleported away 471 // Get a fresh list that will not change as people get teleported away
472 ScenePresence[] presences = m_scene.GetScenePresences(); 472 List<ScenePresence> presences = m_scene.GetScenePresences();
473 473
474 for (int i = 0; i < presences.Length; i++) 474 foreach(ScenePresence p in presences)
475 { 475 {
476 ScenePresence p = presences[i];
477
478 if (p.UUID != senderID) 476 if (p.UUID != senderID)
479 { 477 {
480 // make sure they are still there, we could be working down a long list 478 // make sure they are still there, we could be working down a long list