From 9229d5a324cf772e098929c4c22210557800af2c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 22 Aug 2016 07:55:25 +0100 Subject: locking issue --- .../Framework/Scenes/Animation/MovementAnimationOverrides.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Animation/MovementAnimationOverrides.cs b/OpenSim/Region/Framework/Scenes/Animation/MovementAnimationOverrides.cs index d59678b..ca3ebfb 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/MovementAnimationOverrides.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/MovementAnimationOverrides.cs @@ -52,6 +52,7 @@ namespace OpenSim.Region.Framework.Scenes private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private object MAOLock = new object(); private Dictionary m_overrides = new Dictionary(); public void SetOverride(string state, UUID animID) { @@ -66,13 +67,13 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat("Setting override for {0} to {1}", state, animID); - lock (m_overrides) + lock (MAOLock) m_overrides[state] = animID; } public UUID GetOverriddenAnimation(string state) { - lock (m_overrides) + lock (MAOLock) { if (m_overrides.ContainsKey(state)) return m_overrides[state]; @@ -83,7 +84,7 @@ namespace OpenSim.Region.Framework.Scenes public Dictionary CloneAOPairs() { - lock (m_overrides) + lock (MAOLock) { return new Dictionary(m_overrides); } @@ -91,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes public void CopyAOPairsFrom(Dictionary src) { - lock (m_overrides) + lock (MAOLock) { m_overrides.Clear(); m_overrides = new Dictionary(src); -- cgit v1.1