Remove two causes of recursive locking. Merge artefact cleanup.

avinationmerge
Melanie 2012-06-06 20:36:47 +02:00
parent e09a74493f
commit 67483a6e50
1 changed files with 6 additions and 8 deletions

View File

@ -176,16 +176,14 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="ownerId"></param>
public void ChangeInventoryOwner(UUID ownerId)
{
m_items.LockItemsForWrite(true);
if (0 == Items.Count)
{
m_items.LockItemsForWrite(false);
return;
}
List<TaskInventoryItem> items = GetInventoryItems();
if (items.Count == 0)
return;
m_items.LockItemsForWrite(true);
HasInventoryChanged = true;
m_part.ParentGroup.HasGroupChanged = true;
List<TaskInventoryItem> items = GetInventoryItems();
foreach (TaskInventoryItem item in items)
{
if (ownerId != item.OwnerID)
@ -766,8 +764,8 @@ namespace OpenSim.Region.Framework.Scenes
{
if (item.Name == name)
{
return item;
m_items.LockItemsForRead(false);
return item;
}
}
m_items.LockItemsForRead(false);