diff options
author | Justin Clark-Casey (justincc) | 2011-01-17 23:45:25 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-01-17 23:45:25 +0000 |
commit | 81552099d6eaf1142cde4bbe864dfa1e752af5e5 (patch) | |
tree | 7a37a0e38912ca7e1eccddbd02e31a7de8690322 /OpenSim/Region | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-81552099d6eaf1142cde4bbe864dfa1e752af5e5.zip opensim-SC-81552099d6eaf1142cde4bbe864dfa1e752af5e5.tar.gz opensim-SC-81552099d6eaf1142cde4bbe864dfa1e752af5e5.tar.bz2 opensim-SC-81552099d6eaf1142cde4bbe864dfa1e752af5e5.tar.xz |
Fix UnackedBytes client stack statistic as seen in "show queues"
Bytes were being wrongly added again on a resend
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index e54cfc2..fe5156e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -585,8 +585,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
585 | 585 | ||
586 | // Stats tracking | 586 | // Stats tracking |
587 | Interlocked.Increment(ref udpClient.PacketsSent); | 587 | Interlocked.Increment(ref udpClient.PacketsSent); |
588 | if (isReliable) | ||
589 | Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength); | ||
590 | 588 | ||
591 | // Put the UDP payload on the wire | 589 | // Put the UDP payload on the wire |
592 | AsyncBeginSend(buffer); | 590 | AsyncBeginSend(buffer); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index 4cb4aee..d762bef 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Threading; | ||
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
32 | 33 | ||
33 | namespace OpenSim.Region.ClientStack.LindenUDP | 34 | namespace OpenSim.Region.ClientStack.LindenUDP |
@@ -77,6 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
77 | public void Add(OutgoingPacket packet) | 78 | public void Add(OutgoingPacket packet) |
78 | { | 79 | { |
79 | m_pendingAdds.Enqueue(packet); | 80 | m_pendingAdds.Enqueue(packet); |
81 | Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength); | ||
80 | } | 82 | } |
81 | 83 | ||
82 | /// <summary> | 84 | /// <summary> |
@@ -166,7 +168,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
166 | m_packets.Remove(pendingRemove.SequenceNumber); | 168 | m_packets.Remove(pendingRemove.SequenceNumber); |
167 | 169 | ||
168 | // Update stats | 170 | // Update stats |
169 | System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); | 171 | Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); |
170 | 172 | ||
171 | if (!pendingRemove.FromResend) | 173 | if (!pendingRemove.FromResend) |
172 | { | 174 | { |