aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-02 00:22:23 +0000
committerJustin Clark-Casey (justincc)2012-03-02 00:22:23 +0000
commitdcfd05c8eaa4550d9be4c673d660497da1e035c8 (patch)
tree9557ee643dcbd14dfb10a2d2fe86b160cea79935 /OpenSim/Region/ScriptEngine/Shared/Api
parentAdds an OSSL command for regular expression-based string replacement. Parameters (diff)
downloadopensim-SC_OLD-dcfd05c8eaa4550d9be4c673d660497da1e035c8.zip
opensim-SC_OLD-dcfd05c8eaa4550d9be4c673d660497da1e035c8.tar.gz
opensim-SC_OLD-dcfd05c8eaa4550d9be4c673d660497da1e035c8.tar.bz2
opensim-SC_OLD-dcfd05c8eaa4550d9be4c673d660497da1e035c8.tar.xz
lock SenseRepeatListLock when added a new sensor during script reconstitution.
This is already being done in the other place where a sensor is added. Adding a sensor whilst another thread is iterating over the sensor list can cause a concurrency exception.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 5c1bdff..8383c7f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -635,7 +635,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
635 ts.next = 635 ts.next =
636 DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); 636 DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
637 637
638 SenseRepeaters.Add(ts); 638 lock (SenseRepeatListLock)
639 SenseRepeaters.Add(ts);
640
639 idx += 6; 641 idx += 6;
640 } 642 }
641 } 643 }