From aecaadd3bdb8013addde47731e12427e2acc8994 Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 17 Jan 2011 13:10:09 -0800 Subject: objectId in AvatarAnimation packet should be UUID.Zero for non-overridden animations --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index ee4f04e..c765e68 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3466,8 +3466,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP ani.AnimationSourceList[i] = new AvatarAnimationPacket.AnimationSourceListBlock(); ani.AnimationSourceList[i].ObjectID = objectIDs[i]; - if (objectIDs[i] == UUID.Zero) - ani.AnimationSourceList[i].ObjectID = sourceAgentId; } ani.Header.Reliable = false; OutPacket(ani, ThrottleOutPacketType.Task); -- cgit v1.1 From 81552099d6eaf1142cde4bbe864dfa1e752af5e5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Jan 2011 23:45:25 +0000 Subject: Fix UnackedBytes client stack statistic as seen in "show queues" Bytes were being wrongly added again on a resend --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 2 -- OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') 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 // Stats tracking Interlocked.Increment(ref udpClient.PacketsSent); - if (isReliable) - Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength); // Put the UDP payload on the wire 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 @@ using System; using System.Collections.Generic; using System.Net; +using System.Threading; using OpenMetaverse; namespace OpenSim.Region.ClientStack.LindenUDP @@ -77,6 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void Add(OutgoingPacket packet) { m_pendingAdds.Enqueue(packet); + Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength); } /// @@ -166,7 +168,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_packets.Remove(pendingRemove.SequenceNumber); // Update stats - System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); + Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); if (!pendingRemove.FromResend) { -- cgit v1.1 From 6e58996b4d9db202cd7795a37bd687362effef48 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Jan 2011 23:57:50 +0000 Subject: refactor: remove redundant null checks --- .../LindenUDP/UnackedPacketCollection.cs | 45 ++++++++-------------- 1 file changed, 15 insertions(+), 30 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index d762bef..9d40688 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs @@ -141,46 +141,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void ProcessQueues() { // Process all the pending adds - OutgoingPacket pendingAdd; - if (m_pendingAdds != null) - { - while (m_pendingAdds.TryDequeue(out pendingAdd)) - { - if (pendingAdd != null && m_packets != null) - { - m_packets[pendingAdd.SequenceNumber] = pendingAdd; - } - } - } + while (m_pendingAdds.TryDequeue(out pendingAdd)) + m_packets[pendingAdd.SequenceNumber] = pendingAdd; // Process all the pending removes, including updating statistics and round-trip times PendingAck pendingRemove; OutgoingPacket ackedPacket; - if (m_pendingRemoves != null) + while (m_pendingRemoves.TryDequeue(out pendingRemove)) { - while (m_pendingRemoves.TryDequeue(out pendingRemove)) + if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket)) { - if (m_pendingRemoves != null && m_packets != null) + m_packets.Remove(pendingRemove.SequenceNumber); + + // Update stats + Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); + + if (!pendingRemove.FromResend) { - if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket)) - { - m_packets.Remove(pendingRemove.SequenceNumber); - - // Update stats - Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); - - if (!pendingRemove.FromResend) - { - // Calculate the round-trip time for this packet and its ACK - int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount; - if (rtt > 0) - ackedPacket.Client.UpdateRoundTrip(rtt); - } - } + // Calculate the round-trip time for this packet and its ACK + int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount; + if (rtt > 0) + ackedPacket.Client.UpdateRoundTrip(rtt); } } } } } -} +} \ No newline at end of file -- cgit v1.1 From c544f0d0c5fcea625107c0eff25be8aa0586564a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Jan 2011 00:25:24 +0000 Subject: Prune some of the excess logging for client logins. Didn't touch the appearance related stuff. --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index fe5156e..571624b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -857,9 +857,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Acknowledge the UseCircuitCode packet SendAckImmediate(remoteEndPoint, packet.Header.Sequence); - m_log.DebugFormat( - "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", - buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); +// m_log.DebugFormat( +// "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", +// buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); } private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) -- cgit v1.1 From 624bf23abb3f7cf58447c73cff5187963945a15a Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 17 Jan 2011 16:39:53 -0800 Subject: force objectId to UUID.Zero for non-overridden animations in AvatarAnimation packet --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index c765e68..e43e3c9 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3465,7 +3465,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP ani.AnimationList[i].AnimSequenceID = seqs[i]; ani.AnimationSourceList[i] = new AvatarAnimationPacket.AnimationSourceListBlock(); - ani.AnimationSourceList[i].ObjectID = objectIDs[i]; + if (objectIDs[i].Equals(sourceAgentId)) + ani.AnimationSourceList[i].ObjectID = UUID.Zero; + else + ani.AnimationSourceList[i].ObjectID = objectIDs[i]; } ani.Header.Reliable = false; OutPacket(ani, ThrottleOutPacketType.Task); -- cgit v1.1