aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2012-06-06 20:36:47 +0200
committerMelanie2012-06-06 20:36:47 +0200
commit67483a6e50e491b65ce5fdbd36e06ba697772b36 (patch)
tree5a165939de32e711578a5ba8235406913e4511f7
parentReverse the logic of a conditional. Clears up a merge artefact. (diff)
downloadopensim-SC-67483a6e50e491b65ce5fdbd36e06ba697772b36.zip
opensim-SC-67483a6e50e491b65ce5fdbd36e06ba697772b36.tar.gz
opensim-SC-67483a6e50e491b65ce5fdbd36e06ba697772b36.tar.bz2
opensim-SC-67483a6e50e491b65ce5fdbd36e06ba697772b36.tar.xz
Remove two causes of recursive locking. Merge artefact cleanup.
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs12
1 files changed, 5 insertions, 7 deletions
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
176 /// <param name="ownerId"></param> 176 /// <param name="ownerId"></param>
177 public void ChangeInventoryOwner(UUID ownerId) 177 public void ChangeInventoryOwner(UUID ownerId)
178 { 178 {
179 m_items.LockItemsForWrite(true); 179 List<TaskInventoryItem> items = GetInventoryItems();
180 if (0 == Items.Count) 180
181 { 181 if (items.Count == 0)
182 m_items.LockItemsForWrite(false);
183 return; 182 return;
184 }
185 183
184 m_items.LockItemsForWrite(true);
186 HasInventoryChanged = true; 185 HasInventoryChanged = true;
187 m_part.ParentGroup.HasGroupChanged = true; 186 m_part.ParentGroup.HasGroupChanged = true;
188 List<TaskInventoryItem> items = GetInventoryItems();
189 foreach (TaskInventoryItem item in items) 187 foreach (TaskInventoryItem item in items)
190 { 188 {
191 if (ownerId != item.OwnerID) 189 if (ownerId != item.OwnerID)
@@ -766,8 +764,8 @@ namespace OpenSim.Region.Framework.Scenes
766 { 764 {
767 if (item.Name == name) 765 if (item.Name == name)
768 { 766 {
769 return item;
770 m_items.LockItemsForRead(false); 767 m_items.LockItemsForRead(false);
768 return item;
771 } 769 }
772 } 770 }
773 m_items.LockItemsForRead(false); 771 m_items.LockItemsForRead(false);