aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-10 16:37:45 +0000
committerMelanie Thielker2008-08-10 16:37:45 +0000
commit9b7e66ceda0d7fb17af5b29f3b2be4567f1c2211 (patch)
treec9d991db159ea57bd1ed0162300690de8219a785 /OpenSim
parentPatch #9024 (diff)
downloadopensim-SC_OLD-9b7e66ceda0d7fb17af5b29f3b2be4567f1c2211.zip
opensim-SC_OLD-9b7e66ceda0d7fb17af5b29f3b2be4567f1c2211.tar.gz
opensim-SC_OLD-9b7e66ceda0d7fb17af5b29f3b2be4567f1c2211.tar.bz2
opensim-SC_OLD-9b7e66ceda0d7fb17af5b29f3b2be4567f1c2211.tar.xz
Attempt to address Mantis #1905, #1909
Prevent re-sequencing of resent packets. Thanks, ckrinke, for catching that, it is what was happening.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs29
1 files changed, 17 insertions, 12 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index aaa8113..f764405 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -240,6 +240,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
240 return; 240 return;
241 } 241 }
242 242
243 packet.Header.Sequence = 0;
244
243 lock (m_NeedAck) 245 lock (m_NeedAck)
244 { 246 {
245 DropResend(id); 247 DropResend(id);
@@ -724,18 +726,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
724 packet.TickCount = System.Environment.TickCount; 726 packet.TickCount = System.Environment.TickCount;
725 727
726 // Assign sequence number here to prevent out of order packets 728 // Assign sequence number here to prevent out of order packets
727 packet.Header.Sequence = NextPacketSequenceNumber(); 729 if(packet.Header.Sequence == 0)
728 730 {
729 lock (m_NeedAck) 731 packet.Header.Sequence = NextPacketSequenceNumber();
730 { 732
731 // We want to see that packet arrive if it's reliable 733 lock (m_NeedAck)
732 if (packet.Header.Reliable) 734 {
733 { 735 // We want to see that packet arrive if it's reliable
734 m_UnackedBytes += packet.ToBytes().Length; 736 if (packet.Header.Reliable)
735 m_NeedAck[packet.Header.Sequence] = new AckData(packet, 737 {
736 item.Identifier); 738 m_UnackedBytes += packet.ToBytes().Length;
737 } 739 m_NeedAck[packet.Header.Sequence] = new AckData(packet,
738 } 740 item.Identifier);
741 }
742 }
743 }
739 744
740 // Actually make the byte array and send it 745 // Actually make the byte array and send it
741 try 746 try