aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-22 02:23:25 +0100
committerJustin Clark-Casey (justincc)2012-06-22 02:23:25 +0100
commit80a41e670dd9bbd2771fbcf250362cefa2797306 (patch)
tree7540a025a7d9b157feedeb48454aba93b2edda70 /OpenSim
parentIf starting scripts on initial sim start, provide INFO level log feedback eac... (diff)
downloadopensim-SC_OLD-80a41e670dd9bbd2771fbcf250362cefa2797306.zip
opensim-SC_OLD-80a41e670dd9bbd2771fbcf250362cefa2797306.tar.gz
opensim-SC_OLD-80a41e670dd9bbd2771fbcf250362cefa2797306.tar.bz2
opensim-SC_OLD-80a41e670dd9bbd2771fbcf250362cefa2797306.tar.xz
Avoid race condition between m_PrimObjects iteration in XEngine.PostObjectEvent and places where the list is modified by extending the m_PrimObjects lock.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 40f48e3..25b27b9 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1363,22 +1363,22 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1363 return false; 1363 return false;
1364 1364
1365 uuids = m_PrimObjects[localID]; 1365 uuids = m_PrimObjects[localID];
1366 }
1367 1366
1368 foreach (UUID itemID in uuids) 1367 foreach (UUID itemID in uuids)
1369 {
1370 IScriptInstance instance = null;
1371 try
1372 {
1373 if (m_Scripts.ContainsKey(itemID))
1374 instance = m_Scripts[itemID];
1375 }
1376 catch { /* ignore race conditions */ }
1377
1378 if (instance != null)
1379 { 1368 {
1380 instance.PostEvent(p); 1369 IScriptInstance instance = null;
1381 result = true; 1370 try
1371 {
1372 if (m_Scripts.ContainsKey(itemID))
1373 instance = m_Scripts[itemID];
1374 }
1375 catch { /* ignore race conditions */ }
1376
1377 if (instance != null)
1378 {
1379 instance.PostEvent(p);
1380 result = true;
1381 }
1382 } 1382 }
1383 } 1383 }
1384 1384