diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs | 40 |
2 files changed, 30 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 4a7bdfe..98bb4f7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -578,7 +578,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
578 | SyncBeginPrioritySend(buffer, 2); // highest priority | 578 | SyncBeginPrioritySend(buffer, 2); // highest priority |
579 | } | 579 | } |
580 | else if (outgoingPacket.Type == PacketType.ObjectUpdate | 580 | else if (outgoingPacket.Type == PacketType.ObjectUpdate |
581 | || outgoingPacket.Type == PacketType.ChatFromSimulator | ||
582 | || outgoingPacket.Type == PacketType.LayerData) | 581 | || outgoingPacket.Type == PacketType.LayerData) |
583 | { | 582 | { |
584 | SyncBeginPrioritySend(buffer, 1); // medium priority | 583 | SyncBeginPrioritySend(buffer, 1); // medium priority |
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 | } |