diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index ca5a7bd..a4738ff 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | |||
@@ -149,6 +149,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
149 | 149 | ||
150 | private int m_defaultRTO = 3000; | 150 | private int m_defaultRTO = 3000; |
151 | private int m_maxRTO = 60000; | 151 | private int m_maxRTO = 60000; |
152 | public bool m_deliverPackets = true; | ||
152 | 153 | ||
153 | /// <summary> | 154 | /// <summary> |
154 | /// Default constructor | 155 | /// Default constructor |
@@ -389,6 +390,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
389 | if (category >= 0 && category < m_packetOutboxes.Length) | 390 | if (category >= 0 && category < m_packetOutboxes.Length) |
390 | { | 391 | { |
391 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; | 392 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; |
393 | |||
394 | if (m_deliverPackets == false) | ||
395 | { | ||
396 | queue.Enqueue(packet); | ||
397 | return true; | ||
398 | } | ||
399 | |||
392 | TokenBucket bucket = m_throttleCategories[category]; | 400 | TokenBucket bucket = m_throttleCategories[category]; |
393 | 401 | ||
394 | if (bucket.RemoveTokens(packet.Buffer.DataLength)) | 402 | if (bucket.RemoveTokens(packet.Buffer.DataLength)) |
@@ -425,6 +433,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
425 | /// <returns>True if any packets were sent, otherwise false</returns> | 433 | /// <returns>True if any packets were sent, otherwise false</returns> |
426 | public bool DequeueOutgoing() | 434 | public bool DequeueOutgoing() |
427 | { | 435 | { |
436 | if (m_deliverPackets == false) return false; | ||
437 | |||
428 | OutgoingPacket packet; | 438 | OutgoingPacket packet; |
429 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue; | 439 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue; |
430 | TokenBucket bucket; | 440 | TokenBucket bucket; |