aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-26 00:08:53 +0100
committerJustin Clark-Casey (justincc)2010-08-26 00:08:53 +0100
commit8031f8ec09df4f654c86a9c7bc498664f7b9d9dc (patch)
treed6a6da4d448b9bc11ff8d1078b9be089b9872151 /OpenSim/Region/ScriptEngine/Shared/Helpers.cs
parentminor: remove mono compiler warning (diff)
downloadopensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.zip
opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.gz
opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.bz2
opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.xz
Improve consistency of locking for SOG.m_parts in order to avoid race conditions in linking and unlinking
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Helpers.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index 4855d64..41501f2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -209,12 +209,15 @@ namespace OpenSim.Region.ScriptEngine.Shared
209 else 209 else
210 Type = 0x02; // Passive 210 Type = 0x02; // Passive
211 211
212 foreach (SceneObjectPart p in part.ParentGroup.Children.Values) 212 lock (part.ParentGroup.Children)
213 { 213 {
214 if (p.Inventory.ContainsScripts()) 214 foreach (SceneObjectPart p in part.ParentGroup.Children.Values)
215 { 215 {
216 Type |= 0x08; // Scripted 216 if (p.Inventory.ContainsScripts())
217 break; 217 {
218 Type |= 0x08; // Scripted
219 break;
220 }
218 } 221 }
219 } 222 }
220 223