aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorUbitUmarov2016-11-17 20:59:13 +0000
committerUbitUmarov2016-11-17 20:59:13 +0000
commite21ac8b3c40665449e8dc1bbc5647b93c1a59f6c (patch)
treec20df253042fcb8bb13ebf8f7892a2c5af4363c9 /OpenSim/Framework
parentexplicitly remove some references, and other useless changes (diff)
downloadopensim-SC_OLD-e21ac8b3c40665449e8dc1bbc5647b93c1a59f6c.zip
opensim-SC_OLD-e21ac8b3c40665449e8dc1bbc5647b93c1a59f6c.tar.gz
opensim-SC_OLD-e21ac8b3c40665449e8dc1bbc5647b93c1a59f6c.tar.bz2
opensim-SC_OLD-e21ac8b3c40665449e8dc1bbc5647b93c1a59f6c.tar.xz
counting issus safeguard
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/LocklessQueue.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Framework/LocklessQueue.cs b/OpenSim/Framework/LocklessQueue.cs
index 9bd9baf..7ccbba7 100644
--- a/OpenSim/Framework/LocklessQueue.cs
+++ b/OpenSim/Framework/LocklessQueue.cs
@@ -93,7 +93,10 @@ namespace OpenSim.Framework
93 if (oldHead == oldTail) 93 if (oldHead == oldTail)
94 { 94 {
95 if (oldHeadNext == null) 95 if (oldHeadNext == null)
96 {
97 count = 0;
96 return false; 98 return false;
99 }
97 100
98 CAS(ref tail, oldTail, oldHeadNext); 101 CAS(ref tail, oldTail, oldHeadNext);
99 } 102 }
@@ -118,8 +121,7 @@ namespace OpenSim.Framework
118 { 121 {
119 // ugly 122 // ugly
120 T item; 123 T item;
121 while(count > 0) 124 while(Dequeue(out item));
122 Dequeue(out item);
123 Init(); 125 Init();
124 } 126 }
125 127