aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2015-03-12 00:14:30 +0000
committerJustin Clark-Casey (justincc)2015-03-12 00:14:30 +0000
commit3a7d42378f6ca230c8fe34641e21ca168869cec7 (patch)
treee7242d1fa13c3b80bfa4a0703df7ced838a26f3d /OpenSim/Region/ScriptEngine/Shared/Instance
parentLock around EventQueue manipulation in ScriptInstance.SetState() as queues ar... (diff)
downloadopensim-SC-3a7d42378f6ca230c8fe34641e21ca168869cec7.zip
opensim-SC-3a7d42378f6ca230c8fe34641e21ca168869cec7.tar.gz
opensim-SC-3a7d42378f6ca230c8fe34641e21ca168869cec7.tar.bz2
opensim-SC-3a7d42378f6ca230c8fe34641e21ca168869cec7.tar.xz
Move state change in progress in ScriptInstance.PostEvent() to the top of the EventQueue lock to avoid some flags possibly being wrongly set (m_LastControlLevel, etc.)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index fe711d9..d78738f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -676,6 +676,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
676 676
677 lock (EventQueue) 677 lock (EventQueue)
678 { 678 {
679 // The only events that persist across state changes are timers
680 if (m_StateChangeInProgress && data.EventName != "timer")
681 return;
682
679 if (EventQueue.Count >= m_MaxScriptQueue) 683 if (EventQueue.Count >= m_MaxScriptQueue)
680 return; 684 return;
681 685
@@ -719,9 +723,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
719 723
720 m_CollisionInQueue = true; 724 m_CollisionInQueue = true;
721 } 725 }
722
723 // The only events that persist across state changes are timers
724 if (m_StateChangeInProgress && data.EventName != "timer") return;
725 726
726 EventQueue.Enqueue(data); 727 EventQueue.Enqueue(data);
727 728