aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-02-20 14:04:29 +0000
committerJustin Clarke Casey2009-02-20 14:04:29 +0000
commit01f70de2ea562f78991084be01a83295f8f2be0b (patch)
treeff43706bf83039ce9d9c6c5bfffe56f2df1d1c86 /OpenSim/Region/Framework/Scenes/UuidGatherer.cs
parentRevert previous commit (diff)
downloadopensim-SC-01f70de2ea562f78991084be01a83295f8f2be0b.zip
opensim-SC-01f70de2ea562f78991084be01a83295f8f2be0b.tar.gz
opensim-SC-01f70de2ea562f78991084be01a83295f8f2be0b.tar.bz2
opensim-SC-01f70de2ea562f78991084be01a83295f8f2be0b.tar.xz
* Consistently lock part.TaskInventory as pointed out in http://opensimulator.org/mantis/view.php?id=3159
* Not locking causes enumeration exceptions as described in this matis * part.TaskInventory needs to be locked for every access as it's a dictionary * Extra locking will hopefully not cause any major issues - in places where the enumeration of the dictionary performs other lock or long running operations, the dictionary is cloned instead
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/UuidGatherer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index bc8896e..7b2fae0 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -140,9 +140,11 @@ namespace OpenSim.Region.Framework.Scenes
140 // If the prim is a sculpt then preserve this information too 140 // If the prim is a sculpt then preserve this information too
141 if (part.Shape.SculptTexture != UUID.Zero) 141 if (part.Shape.SculptTexture != UUID.Zero)
142 assetUuids[part.Shape.SculptTexture] = 1; 142 assetUuids[part.Shape.SculptTexture] = 1;
143 143
144 TaskInventoryDictionary taskDictionary = (TaskInventoryDictionary)part.TaskInventory.Clone();
145
144 // Now analyze this prim's inventory items to preserve all the uuids that they reference 146 // Now analyze this prim's inventory items to preserve all the uuids that they reference
145 foreach (TaskInventoryItem tii in part.TaskInventory.Values) 147 foreach (TaskInventoryItem tii in taskDictionary.Values)
146 { 148 {
147 //m_log.DebugFormat("[ARCHIVER]: Analysing item asset type {0}", tii.Type); 149 //m_log.DebugFormat("[ARCHIVER]: Analysing item asset type {0}", tii.Type);
148 150