aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-02 00:22:23 +0000
committerJustin Clark-Casey (justincc)2012-03-02 00:37:42 +0000
commit58b1c3cec0a858abd82a55ee102dc97de1a135f5 (patch)
treea3c5e3f2b29df21b7c039e57e4aca70f0fade421 /OpenSim/Region
parentFlick 0.7.3-post-fixes to Flavour.Post_Fixes (diff)
downloadopensim-SC_OLD-58b1c3cec0a858abd82a55ee102dc97de1a135f5.zip
opensim-SC_OLD-58b1c3cec0a858abd82a55ee102dc97de1a135f5.tar.gz
opensim-SC_OLD-58b1c3cec0a858abd82a55ee102dc97de1a135f5.tar.bz2
opensim-SC_OLD-58b1c3cec0a858abd82a55ee102dc97de1a135f5.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')
-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 }