mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Rewrote parts of the code that were double-locking different objects. This is about half of the code base reviewed.
This commit is contained in:
@@ -111,16 +111,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||
|
||||
private Scene FindClientScene(UUID agentId)
|
||||
{
|
||||
List<Scene> scenes = null;
|
||||
lock (m_Scenelist)
|
||||
scenes = new List<Scene>(m_Scenelist);
|
||||
|
||||
foreach (Scene scene in scenes)
|
||||
{
|
||||
foreach (Scene scene in m_Scenelist)
|
||||
ScenePresence presence = scene.GetScenePresence(agentId);
|
||||
if (presence != null)
|
||||
{
|
||||
ScenePresence presence = scene.GetScenePresence(agentId);
|
||||
if (presence != null)
|
||||
{
|
||||
if (!presence.IsChildAgent)
|
||||
return scene;
|
||||
}
|
||||
if (!presence.IsChildAgent)
|
||||
return scene;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user