aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2016-08-22 07:55:25 +0100
committerUbitUmarov2016-08-22 07:55:25 +0100
commit9229d5a324cf772e098929c4c22210557800af2c (patch)
tree082944515e6d91e833cbfec9437b5000e4fc5b51 /OpenSim
parentminor locking issue (diff)
downloadopensim-SC_OLD-9229d5a324cf772e098929c4c22210557800af2c.zip
opensim-SC_OLD-9229d5a324cf772e098929c4c22210557800af2c.tar.gz
opensim-SC_OLD-9229d5a324cf772e098929c4c22210557800af2c.tar.bz2
opensim-SC_OLD-9229d5a324cf772e098929c4c22210557800af2c.tar.xz
locking issue
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/MovementAnimationOverrides.cs9
1 files changed, 5 insertions, 4 deletions
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
52 private static readonly ILog m_log = 52 private static readonly ILog m_log =
53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
54 54
55 private object MAOLock = new object();
55 private Dictionary<string, UUID> m_overrides = new Dictionary<string, UUID>(); 56 private Dictionary<string, UUID> m_overrides = new Dictionary<string, UUID>();
56 public void SetOverride(string state, UUID animID) 57 public void SetOverride(string state, UUID animID)
57 { 58 {
@@ -66,13 +67,13 @@ namespace OpenSim.Region.Framework.Scenes
66 67
67 m_log.DebugFormat("Setting override for {0} to {1}", state, animID); 68 m_log.DebugFormat("Setting override for {0} to {1}", state, animID);
68 69
69 lock (m_overrides) 70 lock (MAOLock)
70 m_overrides[state] = animID; 71 m_overrides[state] = animID;
71 } 72 }
72 73
73 public UUID GetOverriddenAnimation(string state) 74 public UUID GetOverriddenAnimation(string state)
74 { 75 {
75 lock (m_overrides) 76 lock (MAOLock)
76 { 77 {
77 if (m_overrides.ContainsKey(state)) 78 if (m_overrides.ContainsKey(state))
78 return m_overrides[state]; 79 return m_overrides[state];
@@ -83,7 +84,7 @@ namespace OpenSim.Region.Framework.Scenes
83 84
84 public Dictionary<string, UUID> CloneAOPairs() 85 public Dictionary<string, UUID> CloneAOPairs()
85 { 86 {
86 lock (m_overrides) 87 lock (MAOLock)
87 { 88 {
88 return new Dictionary<string, UUID>(m_overrides); 89 return new Dictionary<string, UUID>(m_overrides);
89 } 90 }
@@ -91,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes
91 92
92 public void CopyAOPairsFrom(Dictionary<string, UUID> src) 93 public void CopyAOPairsFrom(Dictionary<string, UUID> src)
93 { 94 {
94 lock (m_overrides) 95 lock (MAOLock)
95 { 96 {
96 m_overrides.Clear(); 97 m_overrides.Clear();
97 m_overrides = new Dictionary<string, UUID>(src); 98 m_overrides = new Dictionary<string, UUID>(src);