* 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.
0.6.0-stable
Teravus Ovares 2008-11-07 01:05:22 +00:00
parent eec8c6cd6e
commit f0bf3df024
1 changed files with 2 additions and 0 deletions

View File

@ -453,6 +453,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ack_it.Packets = new PacketAckPacket.PacketsBlock[1]; ack_it.Packets = new PacketAckPacket.PacketsBlock[1];
ack_it.Packets[0] = new PacketAckPacket.PacketsBlock(); ack_it.Packets[0] = new PacketAckPacket.PacketsBlock();
ack_it.Packets[0].ID = useCircuit.Header.Sequence; 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; ack_it.Header.Reliable = false;
SendPacketTo(ack_it.ToBytes(), ack_it.ToBytes().Length, SocketFlags.None, useCircuit.CircuitCode.Code); SendPacketTo(ack_it.ToBytes(), ack_it.ToBytes().Length, SocketFlags.None, useCircuit.CircuitCode.Code);