aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs12
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs28
2 files changed, 38 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 1e8bbb8..6129e10 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3590,7 +3590,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3590 // Remove the update packet from the list of packets waiting for acknowledgement 3590 // Remove the update packet from the list of packets waiting for acknowledgement
3591 // because we are requeuing the list of updates. They will be resent in new packets 3591 // because we are requeuing the list of updates. They will be resent in new packets
3592 // with the most recent state and priority. 3592 // with the most recent state and priority.
3593 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber, 0, true); 3593 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
3594
3595 // Count this as a resent packet since we are going to requeue all of the updates contained in it
3596 Interlocked.Increment(ref m_udpClient.PacketsResent);
3597
3594 foreach (EntityUpdate update in updates) 3598 foreach (EntityUpdate update in updates)
3595 ResendPrimUpdate(update); 3599 ResendPrimUpdate(update);
3596 } 3600 }
@@ -4038,7 +4042,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4038 // Remove the update packet from the list of packets waiting for acknowledgement 4042 // Remove the update packet from the list of packets waiting for acknowledgement
4039 // because we are requeuing the list of updates. They will be resent in new packets 4043 // because we are requeuing the list of updates. They will be resent in new packets
4040 // with the most recent state. 4044 // with the most recent state.
4041 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber, 0, true); 4045 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
4046
4047 // Count this as a resent packet since we are going to requeue all of the updates contained in it
4048 Interlocked.Increment(ref m_udpClient.PacketsResent);
4049
4042 foreach (ObjectPropertyUpdate update in updates) 4050 foreach (ObjectPropertyUpdate update in updates)
4043 ResendPropertyUpdate(update); 4051 ResendPropertyUpdate(update);
4044 } 4052 }
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
index b170964..90a87fa 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
@@ -83,6 +83,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
83 83
84 /// <summary> 84 /// <summary>
85 /// Marks a packet as acknowledged 85 /// Marks a packet as acknowledged
86 /// This method is used when an acknowledgement is received from the network for a previously
87 /// sent packet. Effects of removal this way are to update unacked byte count, adjust RTT
88 /// and increase throttle to the coresponding client.
86 /// </summary> 89 /// </summary>
87 /// <param name="sequenceNumber">Sequence number of the packet to 90 /// <param name="sequenceNumber">Sequence number of the packet to
88 /// acknowledge</param> 91 /// acknowledge</param>
@@ -95,6 +98,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP
95 } 98 }
96 99
97 /// <summary> 100 /// <summary>
101 /// Marks a packet as no longer needing acknowledgement without a received acknowledgement.
102 /// This method is called when a packet expires and we no longer need an acknowledgement.
103 /// When some reliable packet types expire, they are handled in a way other than simply
104 /// resending them. The only effect of removal this way is to update unacked byte count.
105 /// </summary>
106 /// <param name="sequenceNumber">Sequence number of the packet to
107 /// acknowledge</param>
108 /// <remarks>The packet is removed from the collection immediately.
109 /// This function is not threadsafe. It must be called by the thread calling GetExpiredPackets.</remarks>
110 public void Remove(uint sequenceNumber)
111 {
112 OutgoingPacket removedPacket;
113 if (m_packets.TryGetValue(sequenceNumber, out removedPacket))
114 {
115 if (removedPacket != null)
116 {
117 m_packets.Remove(sequenceNumber);
118
119 // Update stats
120 Interlocked.Add(ref removedPacket.Client.UnackedBytes, -removedPacket.Buffer.DataLength);
121 }
122 }
123 }
124
125 /// <summary>
98 /// Returns a list of all of the packets with a TickCount older than 126 /// Returns a list of all of the packets with a TickCount older than
99 /// the specified timeout 127 /// the specified timeout
100 /// </summary> 128 /// </summary>