aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs25
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index ef1f34a..46d5610 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -83,6 +83,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
83 internal LLPacketThrottle TextureThrottle; 83 internal LLPacketThrottle TextureThrottle;
84 internal LLPacketThrottle TotalThrottle; 84 internal LLPacketThrottle TotalThrottle;
85 85
86 private List<uint> contents = new List<uint>();
87
86 /// <summary> 88 /// <summary>
87 /// The number of packets in the OutgoingPacketQueue 89 /// The number of packets in the OutgoingPacketQueue
88 /// 90 ///
@@ -186,6 +188,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
186 return; 188 return;
187 } 189 }
188 190
191 if (item.Sequence != 0)
192 contents.Add(item.Sequence);
193
189 lock (this) 194 lock (this)
190 { 195 {
191 switch (item.throttleType & ThrottleOutPacketType.TypeMask) 196 switch (item.throttleType & ThrottleOutPacketType.TypeMask)
@@ -226,7 +231,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
226 231
227 public LLQueItem Dequeue() 232 public LLQueItem Dequeue()
228 { 233 {
229 return SendQueue.Dequeue(); 234 while (true)
235 {
236 LLQueItem item = SendQueue.Dequeue();
237 if (item == null)
238 return null;
239 if (item.Incoming)
240 return item;
241 if (item.Sequence == 0)
242 return item;
243 if (contents.Remove(item.Sequence))
244 return item;
245 }
246 }
247
248 public void Cancel(uint sequence)
249 {
250 while(contents.Remove(sequence))
251 ;
230 } 252 }
231 253
232 public void Flush() 254 public void Flush()
@@ -286,6 +308,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
286 TextureOutgoingPacketQueue.Clear(); 308 TextureOutgoingPacketQueue.Clear();
287 AssetOutgoingPacketQueue.Clear(); 309 AssetOutgoingPacketQueue.Clear();
288 SendQueue.Clear(); 310 SendQueue.Clear();
311 contents.Clear();
289 } 312 }
290 } 313 }
291 314