mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
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.
This commit is contained in:
@@ -469,12 +469,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID)
|
||||
{
|
||||
// Get a fresh list that will not change as people get teleported away
|
||||
ScenePresence[] presences = m_scene.GetScenePresences();
|
||||
List<ScenePresence> presences = m_scene.GetScenePresences();
|
||||
|
||||
for (int i = 0; i < presences.Length; i++)
|
||||
foreach(ScenePresence p in presences)
|
||||
{
|
||||
ScenePresence p = presences[i];
|
||||
|
||||
if (p.UUID != senderID)
|
||||
{
|
||||
// make sure they are still there, we could be working down a long list
|
||||
|
||||
Reference in New Issue
Block a user