aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-09-17 01:21:28 +0100
committerJustin Clark-Casey (justincc)2010-09-17 01:21:28 +0100
commite3f153370566e0fd4b6f63a066e016cb52dcdf62 (patch)
treee30f91e0a065d417a74c92fd4abe86d3d1ba043d
parentSend KillPackets on the Task queue rather than the State queue (diff)
downloadopensim-SC_OLD-e3f153370566e0fd4b6f63a066e016cb52dcdf62.zip
opensim-SC_OLD-e3f153370566e0fd4b6f63a066e016cb52dcdf62.tar.gz
opensim-SC_OLD-e3f153370566e0fd4b6f63a066e016cb52dcdf62.tar.bz2
opensim-SC_OLD-e3f153370566e0fd4b6f63a066e016cb52dcdf62.tar.xz
Fix build break by replacing Items.LockItemsForWrite() with lock (Items) {}
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs43
1 files changed, 21 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index fbaa7d4..7ba30fc 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -142,30 +142,29 @@ namespace OpenSim.Region.Framework.Scenes
142 142
143 public void ResetObjectID() 143 public void ResetObjectID()
144 { 144 {
145 m_items.LockItemsForWrite(true); 145 lock (Items)
146
147 if (Items.Count == 0)
148 {
149 m_items.LockItemsForWrite(false);
150 return;
151 }
152
153 HasInventoryChanged = true;
154 if (m_part.ParentGroup != null)
155 {
156 m_part.ParentGroup.HasGroupChanged = true;
157 }
158
159 IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
160 Items.Clear();
161
162 foreach (TaskInventoryItem item in items)
163 { 146 {
164 item.ParentPartID = m_part.UUID; 147 if (Items.Count == 0)
165 item.ParentID = m_part.UUID; 148 {
166 Items.Add(item.ItemID, item); 149 return;
150 }
151
152 HasInventoryChanged = true;
153 if (m_part.ParentGroup != null)
154 {
155 m_part.ParentGroup.HasGroupChanged = true;
156 }
157
158 IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
159 Items.Clear();
160
161 foreach (TaskInventoryItem item in items)
162 {
163 item.ParentPartID = m_part.UUID;
164 item.ParentID = m_part.UUID;
165 Items.Add(item.ItemID, item);
166 }
167 } 167 }
168 m_items.LockItemsForWrite(false);
169 } 168 }
170 169
171 /// <summary> 170 /// <summary>