From 89d23a1fa23cb191e7ebde047311adcadf3b2e45 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 7 Oct 2009 01:45:49 +0100 Subject: Revert "Rewrote parts of the code that were double-locking different objects. This is about half of the code base reviewed." This reverts commit e992ca025571a891333a57012c2cd4419b6581e5. --- .../Avatar/Inventory/Transfer/InventoryTransferModule.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index e6e0483..d9a021f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -111,17 +111,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer private Scene FindClientScene(UUID agentId) { - List scenes = null; lock (m_Scenelist) - scenes = new List(m_Scenelist); - - foreach (Scene scene in scenes) { - ScenePresence presence = scene.GetScenePresence(agentId); - if (presence != null) + foreach (Scene scene in m_Scenelist) { - if (!presence.IsChildAgent) - return scene; + ScenePresence presence = scene.GetScenePresence(agentId); + if (presence != null) + { + if (!presence.IsChildAgent) + return scene; + } } } return null; -- cgit v1.1