aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
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
parentAdds an OSSL command for regular expression-based string replacement. Parameters (diff)
downloadopensim-SC-dcfd05c8eaa4550d9be4c673d660497da1e035c8.zip
opensim-SC-dcfd05c8eaa4550d9be4c673d660497da1e035c8.tar.gz
opensim-SC-dcfd05c8eaa4550d9be4c673d660497da1e035c8.tar.bz2
opensim-SC-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')
-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 }