diff options
author | CasperW | 2009-11-21 18:50:52 +0100 |
---|---|---|
committer | Melanie | 2009-11-21 16:51:08 +0000 |
commit | 4a29a7f92cc5264dfcb4a4376a61506d29dd9d8d (patch) | |
tree | 31977d927ae2e22f315f13645213b0d3d88a9dc0 /OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs | |
parent | Improved avatar responsiveness. (diff) | |
download | opensim-SC_OLD-4a29a7f92cc5264dfcb4a4376a61506d29dd9d8d.zip opensim-SC_OLD-4a29a7f92cc5264dfcb4a4376a61506d29dd9d8d.tar.gz opensim-SC_OLD-4a29a7f92cc5264dfcb4a4376a61506d29dd9d8d.tar.bz2 opensim-SC_OLD-4a29a7f92cc5264dfcb4a4376a61506d29dd9d8d.tar.xz |
Minor packet ordering fix
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs index 45d9170..de2cd24 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs | |||
@@ -57,7 +57,12 @@ namespace OpenMetaverse | |||
57 | /// Standard queue for our outgoing SyncBeginPrioritySend | 57 | /// Standard queue for our outgoing SyncBeginPrioritySend |
58 | /// </summary> | 58 | /// </summary> |
59 | private List<UDPPacketBuffer> m_standardQueue = new List<UDPPacketBuffer>(); | 59 | private List<UDPPacketBuffer> m_standardQueue = new List<UDPPacketBuffer>(); |
60 | 60 | ||
61 | /// <summary> | ||
62 | /// Medium priority queue for our outgoing SyncBeginPrioritySend | ||
63 | /// </summary> | ||
64 | private List<UDPPacketBuffer> m_mediumPriorityQueue = new List<UDPPacketBuffer>(); | ||
65 | |||
61 | /// <summary> | 66 | /// <summary> |
62 | /// Prioritised queue for our outgoing SyncBeginPrioritySend | 67 | /// Prioritised queue for our outgoing SyncBeginPrioritySend |
63 | /// </summary> | 68 | /// </summary> |
@@ -285,13 +290,16 @@ namespace OpenMetaverse | |||
285 | } | 290 | } |
286 | else | 291 | else |
287 | { | 292 | { |
288 | lock (m_standardQueue) | 293 | if (Priority != 0) |
289 | { | 294 | { |
290 | if (Priority != 0) | 295 | lock (m_mediumPriorityQueue) |
291 | { | 296 | { |
292 | m_standardQueue.Insert(0, buf); | 297 | m_mediumPriorityQueue.Add(buf); |
293 | } | 298 | } |
294 | else | 299 | } |
300 | else | ||
301 | { | ||
302 | lock (m_standardQueue) | ||
295 | { | 303 | { |
296 | m_standardQueue.Add(buf); | 304 | m_standardQueue.Add(buf); |
297 | } | 305 | } |
@@ -339,17 +347,29 @@ namespace OpenMetaverse | |||
339 | } | 347 | } |
340 | else | 348 | else |
341 | { | 349 | { |
342 | lock (m_standardQueue) | 350 | lock (m_mediumPriorityQueue) |
343 | { | 351 | { |
344 | if (m_standardQueue.Count > 0) | 352 | if (m_mediumPriorityQueue.Count > 0) |
345 | { | 353 | { |
346 | UDPPacketBuffer buf = m_standardQueue[0]; | 354 | UDPPacketBuffer buf = m_mediumPriorityQueue[0]; |
347 | m_standardQueue.RemoveAt(0); | 355 | m_mediumPriorityQueue.RemoveAt(0); |
348 | AsyncBeginSend(buf); | 356 | AsyncBeginSend(buf); |
349 | } | 357 | } |
350 | else | 358 | else |
351 | { | 359 | { |
352 | m_sendingData = false; | 360 | lock (m_standardQueue) |
361 | { | ||
362 | if (m_standardQueue.Count > 0) | ||
363 | { | ||
364 | UDPPacketBuffer buf = m_standardQueue[0]; | ||
365 | m_standardQueue.RemoveAt(0); | ||
366 | AsyncBeginSend(buf); | ||
367 | } | ||
368 | else | ||
369 | { | ||
370 | m_sendingData = false; | ||
371 | } | ||
372 | } | ||
353 | } | 373 | } |
354 | } | 374 | } |
355 | } | 375 | } |