From 67483a6e50e491b65ce5fdbd36e06ba697772b36 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 6 Jun 2012 20:36:47 +0200
Subject: Remove two causes of recursive locking. Merge artefact cleanup.
---
OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index f5b9825..81477e7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -176,16 +176,14 @@ namespace OpenSim.Region.Framework.Scenes
///
public void ChangeInventoryOwner(UUID ownerId)
{
- m_items.LockItemsForWrite(true);
- if (0 == Items.Count)
- {
- m_items.LockItemsForWrite(false);
+ List items = GetInventoryItems();
+
+ if (items.Count == 0)
return;
- }
+ m_items.LockItemsForWrite(true);
HasInventoryChanged = true;
m_part.ParentGroup.HasGroupChanged = true;
- List 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);
--
cgit v1.1