From afca24acbe9c8835eccd19b658cd8651712a1040 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Mon, 14 Mar 2011 22:37:09 -0700 Subject: [PATCH] Added some debugging for queues. Temporary change --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 12 +++++++++--- .../Region/ClientStack/LindenUDP/OutgoingPacket.cs | 8 +------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 907f2bbc50..c74e83c513 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -255,7 +255,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { for (int i = 0; i < 9; ++i) { - int val = Interlocked.Exchange(ref OutgoingPacket.CatCounts[i], 0); + int val = Interlocked.Exchange(ref CatCounts[i], 0); m_log.WarnFormat("OutgoingPacket type {0} count = {1}", i, val); } } @@ -360,7 +360,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP byte[] data = packet.ToBytes(); SendPacketData(udpClient, data, packet.Type, category); } - } + } + + private int[] CatCounts = new int[9]; /// /// Start the process of sending a packet to the client. @@ -424,7 +426,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Queue or Send - OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category); + OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category); + if (category == ThrottleOutPacketType.Unknown) + Interlocked.Increment(ref CatCounts[8]); + else + Interlocked.Increment(ref CatCounts[(int)category]); // If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will // continue to display the deleted object until relog. Therefore, we need to always queue a kill object diff --git a/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs b/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs index 7d780dfd8d..188b8b8a95 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs @@ -54,8 +54,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Category this packet belongs to public ThrottleOutPacketType Category; - public static int[] CatCounts = new int[9]; - /// /// Default constructor /// @@ -67,11 +65,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { Client = client; Buffer = buffer; - Category = category; - int type = (int)category; - if (category == ThrottleOutPacketType.Unknown) - type = 8; - Interlocked.Increment(ref OutgoingPacket.CatCounts[type]); + Category = category; } } }