aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-01-17 23:45:25 +0000
committerJustin Clark-Casey (justincc)2011-01-17 23:45:25 +0000
commit81552099d6eaf1142cde4bbe864dfa1e752af5e5 (patch)
tree7a37a0e38912ca7e1eccddbd02e31a7de8690322 /OpenSim/Region/ClientStack
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-81552099d6eaf1142cde4bbe864dfa1e752af5e5.zip
opensim-SC_OLD-81552099d6eaf1142cde4bbe864dfa1e752af5e5.tar.gz
opensim-SC_OLD-81552099d6eaf1142cde4bbe864dfa1e752af5e5.tar.bz2
opensim-SC_OLD-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 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs4
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 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Threading;
31using OpenMetaverse; 32using OpenMetaverse;
32 33
33namespace OpenSim.Region.ClientStack.LindenUDP 34namespace 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 {