diff options
Diffstat (limited to '')
-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 e02783a..5aa9b40 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 |
@@ -415,6 +416,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
415 | if (category >= 0 && category < m_packetOutboxes.Length) | 416 | if (category >= 0 && category < m_packetOutboxes.Length) |
416 | { | 417 | { |
417 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; | 418 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; |
419 | |||
420 | if (m_deliverPackets == false) | ||
421 | { | ||
422 | queue.Enqueue(packet); | ||
423 | return true; | ||
424 | } | ||
425 | |||
418 | TokenBucket bucket = m_throttleCategories[category]; | 426 | TokenBucket bucket = m_throttleCategories[category]; |
419 | 427 | ||
420 | if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength)) | 428 | if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength)) |
@@ -451,6 +459,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
451 | /// <returns>True if any packets were sent, otherwise false</returns> | 459 | /// <returns>True if any packets were sent, otherwise false</returns> |
452 | public bool DequeueOutgoing() | 460 | public bool DequeueOutgoing() |
453 | { | 461 | { |
462 | if (m_deliverPackets == false) return false; | ||
463 | |||
454 | OutgoingPacket packet; | 464 | OutgoingPacket packet; |
455 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue; | 465 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue; |
456 | TokenBucket bucket; | 466 | TokenBucket bucket; |