aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 9a8bfd3..0fa074d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -151,6 +151,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
151 151
152 private int m_defaultRTO = 1000; // 1sec is the recommendation in the RFC 152 private int m_defaultRTO = 1000; // 1sec is the recommendation in the RFC
153 private int m_maxRTO = 60000; 153 private int m_maxRTO = 60000;
154 public bool m_deliverPackets = true;
154 155
155 /// <summary> 156 /// <summary>
156 /// Default constructor 157 /// Default constructor
@@ -418,6 +419,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
418 if (category >= 0 && category < m_packetOutboxes.Length) 419 if (category >= 0 && category < m_packetOutboxes.Length)
419 { 420 {
420 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; 421 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category];
422
423 if (m_deliverPackets == false)
424 {
425 queue.Enqueue(packet);
426 return true;
427 }
428
421 TokenBucket bucket = m_throttleCategories[category]; 429 TokenBucket bucket = m_throttleCategories[category];
422 430
423 if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength)) 431 if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength))
@@ -457,6 +465,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
457 /// <returns>True if any packets were sent, otherwise false</returns> 465 /// <returns>True if any packets were sent, otherwise false</returns>
458 public bool DequeueOutgoing() 466 public bool DequeueOutgoing()
459 { 467 {
468 if (m_deliverPackets == false) return false;
469
460 OutgoingPacket packet; 470 OutgoingPacket packet;
461 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue; 471 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue;
462 TokenBucket bucket; 472 TokenBucket bucket;