Revert "Rewrote parts of the code that were double-locking different objects. This is about half of the code base reviewed."

This reverts commit e992ca0255.
This commit is contained in:
Melanie
2009-10-07 01:45:49 +01:00
parent e992ca0255
commit 89d23a1fa2
9 changed files with 174 additions and 209 deletions

View File

@@ -290,14 +290,13 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// get the agent. This should work every time, as we just got a packet from it
ScenePresence agent = null;
List<Scene> scenes = null;
lock (m_Scenes)
scenes = new List<Scene>(m_Scenes);
foreach (Scene scene in scenes)
{
agent = scene.GetScenePresence(agentID);
if (agent != null) break;
foreach (Scene scene in m_Scenes)
{
agent = scene.GetScenePresence(agentID);
if (agent != null) break;
}
}
// just to be paranoid...