From b375f86f114d11b92a0b7b0c67e39a1bac243c2c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 18 Aug 2014 22:51:36 +0100 Subject: Make LLUDPServer.Scene publicly gettable/privately settable instead of protected so that other logging code in the clientstack can record more useful information Adds some commented out logging for use again in the future. No functional change. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index bfdb24f..9d6085d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4201,6 +4201,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}", +// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name); +// #endregion Packet Sending } -- cgit v1.1 From 298376d5c7a8207f3c42f950cf9c212950038477 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 19 Aug 2014 18:34:17 +0100 Subject: Add "debug lludp drop out " console command for debug/test purposes. This drops all outbound packets that match a given packet name. Can currently only be applied to all connections in a scene. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 9d6085d..15a90af 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12341,6 +12341,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// provide your own method. protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting, UnackedPacketMethod method) { + if (m_outPacketsToDrop != null) + if (m_outPacketsToDrop.Contains(packet.Type.ToString())) + return; + if (DebugPacketLevel > 0) { bool logPacket = true; @@ -13123,5 +13127,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP eq.Enqueue(BuildEvent("BulkUpdateInventory", llsd), AgentId); } + + private HashSet m_outPacketsToDrop; + + public bool AddOutPacketToDropSet(string packetName) + { + if (m_outPacketsToDrop == null) + m_outPacketsToDrop = new HashSet(); + + return m_outPacketsToDrop.Add(packetName); + } + + public bool RemoveOutPacketFromDropSet(string packetName) + { + if (m_outPacketsToDrop == null) + return false; + + return m_outPacketsToDrop.Remove(packetName); + } + + public HashSet GetOutPacketDropSet() + { + return new HashSet(m_outPacketsToDrop); + } } } -- cgit v1.1 From 4e03d352c356ca9ebe22a1ac623dc85f4b7922e8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 19 Aug 2014 18:43:21 +0100 Subject: Extend drop command to "debug lludp drop ..." to allow drop of inbound packets. For test/debug purposes. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 15a90af..c839c05 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12403,6 +12403,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// OpenMetaverse.packet public void ProcessInPacket(Packet packet) { + if (m_inPacketsToDrop != null) + if (m_inPacketsToDrop.Contains(packet.Type.ToString())) + return; + if (DebugPacketLevel > 0) { bool logPacket = true; @@ -13150,5 +13154,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP { return new HashSet(m_outPacketsToDrop); } + + private HashSet m_inPacketsToDrop; + + public bool AddInPacketToDropSet(string packetName) + { + if (m_inPacketsToDrop == null) + m_inPacketsToDrop = new HashSet(); + + return m_inPacketsToDrop.Add(packetName); + } + + public bool RemoveInPacketFromDropSet(string packetName) + { + if (m_inPacketsToDrop == null) + return false; + + return m_inPacketsToDrop.Remove(packetName); + } + + public HashSet GetInPacketDropSet() + { + return new HashSet(m_inPacketsToDrop); + } } } -- cgit v1.1