diff options
author | Justin Clark-Casey (justincc) | 2014-08-19 18:34:17 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-08-19 18:34:17 +0100 |
commit | 298376d5c7a8207f3c42f950cf9c212950038477 (patch) | |
tree | 87a1bbb16b146ec03a9fa57c03940f44c4fb9a77 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | minor:Give console feedback when we sit or stand pCampbot bots. (diff) | |
download | opensim-SC-298376d5c7a8207f3c42f950cf9c212950038477.zip opensim-SC-298376d5c7a8207f3c42f950cf9c212950038477.tar.gz opensim-SC-298376d5c7a8207f3c42f950cf9c212950038477.tar.bz2 opensim-SC-298376d5c7a8207f3c42f950cf9c212950038477.tar.xz |
Add "debug lludp drop out <add|remove> <packet-name>" 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.
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 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 | |||
12341 | /// provide your own method.</param> | 12341 | /// provide your own method.</param> |
12342 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting, UnackedPacketMethod method) | 12342 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting, UnackedPacketMethod method) |
12343 | { | 12343 | { |
12344 | if (m_outPacketsToDrop != null) | ||
12345 | if (m_outPacketsToDrop.Contains(packet.Type.ToString())) | ||
12346 | return; | ||
12347 | |||
12344 | if (DebugPacketLevel > 0) | 12348 | if (DebugPacketLevel > 0) |
12345 | { | 12349 | { |
12346 | bool logPacket = true; | 12350 | bool logPacket = true; |
@@ -13123,5 +13127,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13123 | eq.Enqueue(BuildEvent("BulkUpdateInventory", | 13127 | eq.Enqueue(BuildEvent("BulkUpdateInventory", |
13124 | llsd), AgentId); | 13128 | llsd), AgentId); |
13125 | } | 13129 | } |
13130 | |||
13131 | private HashSet<string> m_outPacketsToDrop; | ||
13132 | |||
13133 | public bool AddOutPacketToDropSet(string packetName) | ||
13134 | { | ||
13135 | if (m_outPacketsToDrop == null) | ||
13136 | m_outPacketsToDrop = new HashSet<string>(); | ||
13137 | |||
13138 | return m_outPacketsToDrop.Add(packetName); | ||
13139 | } | ||
13140 | |||
13141 | public bool RemoveOutPacketFromDropSet(string packetName) | ||
13142 | { | ||
13143 | if (m_outPacketsToDrop == null) | ||
13144 | return false; | ||
13145 | |||
13146 | return m_outPacketsToDrop.Remove(packetName); | ||
13147 | } | ||
13148 | |||
13149 | public HashSet<string> GetOutPacketDropSet() | ||
13150 | { | ||
13151 | return new HashSet<string>(m_outPacketsToDrop); | ||
13152 | } | ||
13126 | } | 13153 | } |
13127 | } | 13154 | } |