From f0bf3df0249cf7c6dee8538429d00a0907b4de3f Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 7 Nov 2008 01:05:22 +0000 Subject: [PATCH] * Fix half of the issue behind the long standing 'UseCircuitCode' packet spam from libOMV clients. AckPacket.Header.Sequence was 0. This caused LibOMV to ignore it. * There's another patch over at http://jira.openmv.org/browse/LIBOMV-415 to fix the 'resend forever' issue. --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 14d98d48a2..f37db36905 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -453,6 +453,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP ack_it.Packets = new PacketAckPacket.PacketsBlock[1]; ack_it.Packets[0] = new PacketAckPacket.PacketsBlock(); ack_it.Packets[0].ID = useCircuit.Header.Sequence; + // ((useCircuit.Header.Sequence < uint.MaxValue) ? useCircuit.Header.Sequence : 0) is just a failsafe to ensure that we don't overflow. + ack_it.Header.Sequence = ((useCircuit.Header.Sequence < uint.MaxValue) ? useCircuit.Header.Sequence : 0) + 1; ack_it.Header.Reliable = false; SendPacketTo(ack_it.ToBytes(), ack_it.ToBytes().Length, SocketFlags.None, useCircuit.CircuitCode.Code);