From 95c3e0883c35dcb9b4d5f7dc77608f16bea3b992 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 28 Sep 2008 18:07:06 +0000 Subject: Mantis #2288 Correct a typo in namespace declaration Also adds a new flag to the PacketManager to force retention of packets marked reliable (default off) --- .../Region/ClientStack/LindenUDP/LLPacketHandler.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 149fa9a..ea397c7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs @@ -191,7 +191,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP private object m_SequenceLock = new object(); private const int MAX_SEQUENCE = 0xFFFFFF; + // Packet dropping + // List m_ImportantPackets = new List(); + private bool m_ReliableIsImportant = false; + + public bool ReliableIsImportant + { + get { return m_ReliableIsImportant; } + set { m_ReliableIsImportant = value; } + } LLPacketServer m_PacketServer; private byte[] m_ZeroOutBuffer = new byte[4096]; @@ -359,12 +368,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP // if ((now - data.TickCount) > m_DiscardTimeout) { - if (!m_ImportantPackets.Contains(packet.Type)) - m_NeedAck.Remove(packet.Header.Sequence); + if (!m_ReliableIsImportant || !packet.Header.Reliable) + { + if (!m_ImportantPackets.Contains(packet.Type)) + m_NeedAck.Remove(packet.Header.Sequence); - TriggerOnPacketDrop(packet, data.Identifier); + TriggerOnPacketDrop(packet, data.Identifier); - continue; + continue; + } } } } -- cgit v1.1