diff options
author | Justin Clark-Casey (justincc) | 2014-08-19 18:43:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-08-19 18:43:21 +0100 |
commit | 4e03d352c356ca9ebe22a1ac623dc85f4b7922e8 (patch) | |
tree | 58fa4db136d12d0fe0efc1d875df3268d5fbeef5 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | Add "debug lludp drop out <add|remove> <packet-name>" console command for deb... (diff) | |
download | opensim-SC-4e03d352c356ca9ebe22a1ac623dc85f4b7922e8.zip opensim-SC-4e03d352c356ca9ebe22a1ac623dc85f4b7922e8.tar.gz opensim-SC-4e03d352c356ca9ebe22a1ac623dc85f4b7922e8.tar.bz2 opensim-SC-4e03d352c356ca9ebe22a1ac623dc85f4b7922e8.tar.xz |
Extend drop command to "debug lludp drop <in|out>..." to allow drop of inbound packets.
For test/debug purposes.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 27 |
1 files changed, 27 insertions, 0 deletions
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 | |||
12403 | /// <param name="Pack">OpenMetaverse.packet</param> | 12403 | /// <param name="Pack">OpenMetaverse.packet</param> |
12404 | public void ProcessInPacket(Packet packet) | 12404 | public void ProcessInPacket(Packet packet) |
12405 | { | 12405 | { |
12406 | if (m_inPacketsToDrop != null) | ||
12407 | if (m_inPacketsToDrop.Contains(packet.Type.ToString())) | ||
12408 | return; | ||
12409 | |||
12406 | if (DebugPacketLevel > 0) | 12410 | if (DebugPacketLevel > 0) |
12407 | { | 12411 | { |
12408 | bool logPacket = true; | 12412 | bool logPacket = true; |
@@ -13150,5 +13154,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13150 | { | 13154 | { |
13151 | return new HashSet<string>(m_outPacketsToDrop); | 13155 | return new HashSet<string>(m_outPacketsToDrop); |
13152 | } | 13156 | } |
13157 | |||
13158 | private HashSet<string> m_inPacketsToDrop; | ||
13159 | |||
13160 | public bool AddInPacketToDropSet(string packetName) | ||
13161 | { | ||
13162 | if (m_inPacketsToDrop == null) | ||
13163 | m_inPacketsToDrop = new HashSet<string>(); | ||
13164 | |||
13165 | return m_inPacketsToDrop.Add(packetName); | ||
13166 | } | ||
13167 | |||
13168 | public bool RemoveInPacketFromDropSet(string packetName) | ||
13169 | { | ||
13170 | if (m_inPacketsToDrop == null) | ||
13171 | return false; | ||
13172 | |||
13173 | return m_inPacketsToDrop.Remove(packetName); | ||
13174 | } | ||
13175 | |||
13176 | public HashSet<string> GetInPacketDropSet() | ||
13177 | { | ||
13178 | return new HashSet<string>(m_inPacketsToDrop); | ||
13179 | } | ||
13153 | } | 13180 | } |
13154 | } | 13181 | } |