diff options
author | Justin Clark-Casey (justincc) | 2009-11-27 19:01:45 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-27 19:01:45 +0000 |
commit | 2e47e5147547d355d8935404c43fbe1b61888ee1 (patch) | |
tree | da36d5353f4107d7e59c6456c67b12dca081ef3b /OpenSim/Region/CoreModules/Scripting | |
parent | Apply patch that fixes the failing T013_eStateSettingsRandomStorage test (diff) | |
download | opensim-SC_OLD-2e47e5147547d355d8935404c43fbe1b61888ee1.zip opensim-SC_OLD-2e47e5147547d355d8935404c43fbe1b61888ee1.tar.gz opensim-SC_OLD-2e47e5147547d355d8935404c43fbe1b61888ee1.tar.bz2 opensim-SC_OLD-2e47e5147547d355d8935404c43fbe1b61888ee1.tar.xz |
Make locking of timers and listeners in script related functions consistent
See http://opensimulator.org/mantis/view.php?id=4316
Thanks KittyLiu!
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index d4a28e2..60df2e7 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -602,9 +602,12 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
602 | ListenerInfo info = | 602 | ListenerInfo info = |
603 | ListenerInfo.FromData(localID, itemID, hostID, item); | 603 | ListenerInfo.FromData(localID, itemID, hostID, item); |
604 | 604 | ||
605 | if (!m_listeners.ContainsKey((int)item[2])) | 605 | lock (m_listeners) |
606 | m_listeners.Add((int)item[2], new List<ListenerInfo>()); | 606 | { |
607 | m_listeners[(int)item[2]].Add(info); | 607 | if (!m_listeners.ContainsKey((int)item[2])) |
608 | m_listeners.Add((int)item[2], new List<ListenerInfo>()); | ||
609 | m_listeners[(int)item[2]].Add(info); | ||
610 | } | ||
608 | 611 | ||
609 | idx+=6; | 612 | idx+=6; |
610 | } | 613 | } |