aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCasperW2009-12-27 07:08:16 +0100
committerCasperW2009-12-27 07:08:16 +0100
commit19a5e606b38372e882c13e27d6459ee703e07570 (patch)
tree945dced76f22706a7ff9e828993e7f4225a4eec3
parentMake sure that we're not bounds checking attachments. 'Cos otherwise your hai... (diff)
downloadopensim-SC-19a5e606b38372e882c13e27d6459ee703e07570.zip
opensim-SC-19a5e606b38372e882c13e27d6459ee703e07570.tar.gz
opensim-SC-19a5e606b38372e882c13e27d6459ee703e07570.tar.bz2
opensim-SC-19a5e606b38372e882c13e27d6459ee703e07570.tar.xz
Convert some remaining legacy lock()s for m_parts in SceneObjectGroup to ReaderWriteLockSlim, hopefully fixes a native crash
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs24
1 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 5a06bdb..65ce13a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -46,12 +46,12 @@ namespace OpenSim.Region.Framework.Scenes
46 /// </summary> 46 /// </summary>
47 public void ForceInventoryPersistence() 47 public void ForceInventoryPersistence()
48 { 48 {
49 lock (m_parts) 49 lockPartsForRead(true);
50 List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values);
51 lockPartsForRead(false);
52 foreach (SceneObjectPart part in values)
50 { 53 {
51 foreach (SceneObjectPart part in m_parts.Values) 54 part.Inventory.ForceInventoryPersistence();
52 {
53 part.Inventory.ForceInventoryPersistence();
54 }
55 } 55 }
56 } 56 }
57 57
@@ -75,14 +75,16 @@ namespace OpenSim.Region.Framework.Scenes
75 /// Stop the scripts contained in all the prims in this group 75 /// Stop the scripts contained in all the prims in this group
76 /// </summary> 76 /// </summary>
77 public void RemoveScriptInstances() 77 public void RemoveScriptInstances()
78 { 78 {
79 lock (m_parts) 79 lockPartsForRead(true);
80 List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values);
81 lockPartsForRead(false);
82
83 foreach (SceneObjectPart part in values)
80 { 84 {
81 foreach (SceneObjectPart part in m_parts.Values) 85 part.Inventory.RemoveScriptInstances();
82 {
83 part.Inventory.RemoveScriptInstances();
84 }
85 } 86 }
87
86 } 88 }
87 89
88 /// <summary> 90 /// <summary>