diff options
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index fe31bd9..8852715 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -364,6 +364,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
364 | int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; | 364 | int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; |
365 | int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); | 365 | int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); |
366 | 366 | ||
367 | int total = resend + land + wind + cloud + task + texture + asset; | ||
368 | total /= 128; | ||
369 | |||
367 | // Make sure none of the throttles are set below our packet MTU, | 370 | // Make sure none of the throttles are set below our packet MTU, |
368 | // otherwise a throttle could become permanently clogged | 371 | // otherwise a throttle could become permanently clogged |
369 | resend = Math.Max(resend, LLUDPServer.MTU); | 372 | resend = Math.Max(resend, LLUDPServer.MTU); |
@@ -379,8 +382,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
379 | // the task queue (e.g. object updates) | 382 | // the task queue (e.g. object updates) |
380 | task = task + (int)(m_cannibalrate * texture); | 383 | task = task + (int)(m_cannibalrate * texture); |
381 | texture = (int)((1 - m_cannibalrate) * texture); | 384 | texture = (int)((1 - m_cannibalrate) * texture); |
382 | 385 | ||
383 | //int total = resend + land + wind + cloud + task + texture + asset; | 386 | total = resend + land + wind + cloud + task + texture + asset; |
387 | total /= 128; | ||
384 | //m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}", | 388 | //m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}", |
385 | // AgentID, resend, land, wind, cloud, task, texture, asset, total); | 389 | // AgentID, resend, land, wind, cloud, task, texture, asset, total); |
386 | 390 | ||
@@ -484,7 +488,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
484 | // Don't send this packet if there is already a packet waiting in the queue | 488 | // Don't send this packet if there is already a packet waiting in the queue |
485 | // even if we have the tokens to send it, tokens should go to the already | 489 | // even if we have the tokens to send it, tokens should go to the already |
486 | // queued packets | 490 | // queued packets |
487 | if (queue.Count > 0) | 491 | if (queue.Count > 0 || m_nextPackets[category] != null) |
488 | { | 492 | { |
489 | queue.Enqueue(packet, highPriority); | 493 | queue.Enqueue(packet, highPriority); |
490 | return true; | 494 | return true; |
@@ -528,7 +532,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
528 | /// <returns>True if any packets were sent, otherwise false</returns> | 532 | /// <returns>True if any packets were sent, otherwise false</returns> |
529 | public bool DequeueOutgoing() | 533 | public bool DequeueOutgoing() |
530 | { | 534 | { |
531 | if (m_deliverPackets == false) return false; | 535 | // if (m_deliverPackets == false) return false; |
532 | 536 | ||
533 | OutgoingPacket packet = null; | 537 | OutgoingPacket packet = null; |
534 | DoubleLocklessQueue<OutgoingPacket> queue; | 538 | DoubleLocklessQueue<OutgoingPacket> queue; |