aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-31 18:27:10 +0100
committerJustin Clark-Casey (justincc)2010-08-31 18:27:10 +0100
commitb8c58e5f9f5957ae5b28bc17b2db2eb9f55dcd7b (patch)
tree80fd6d3047dfd92daaf6685e7774c88aed30161f /OpenSim/Region/ClientStack/LindenUDP
parentminor: Add some method doc to BaseHttpServer.HandleRequest() (diff)
downloadopensim-SC-b8c58e5f9f5957ae5b28bc17b2db2eb9f55dcd7b.zip
opensim-SC-b8c58e5f9f5957ae5b28bc17b2db2eb9f55dcd7b.tar.gz
opensim-SC-b8c58e5f9f5957ae5b28bc17b2db2eb9f55dcd7b.tar.bz2
opensim-SC-b8c58e5f9f5957ae5b28bc17b2db2eb9f55dcd7b.tar.xz
reinsert functionality to debug log more levels of incoming and outgoing client protocol packets
These levels correspond to packets that one isn't usually interested in when debugging (e.g. regular outgoing SimStats packets) This is equivalent to what we had a year ago before it was removed. It's extremely crude since it doesn't allow one to pick individual clients or packets. However, it can still be useful when debugging packet race conditions.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs52
1 files changed, 43 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 0d142f4..fddb966 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
60 public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector 60 public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector
61 { 61 {
62 /// <value> 62 /// <value>
63 /// Debug packet level. At the moment, only 255 does anything (prints out all in and out packets). 63 /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
64 /// </value> 64 /// </value>
65 protected int m_debugPacketLevel = 0; 65 protected int m_debugPacketLevel = 0;
66 66
@@ -11174,8 +11174,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11174 /// handles splitting manually</param> 11174 /// handles splitting manually</param>
11175 protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) 11175 protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting)
11176 { 11176 {
11177 if (m_debugPacketLevel >= 255) 11177 if (m_debugPacketLevel > 0)
11178 m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); 11178 {
11179 bool outputPacket = true;
11180
11181 if (m_debugPacketLevel <= 255
11182 && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
11183 outputPacket = false;
11184
11185 if (m_debugPacketLevel <= 200
11186 &&
11187 (packet.Type == PacketType.ImagePacket
11188 || packet.Type == PacketType.ImageData
11189 || packet.Type == PacketType.LayerData
11190 || packet.Type == PacketType.CoarseLocationUpdate))
11191 outputPacket = false;
11192
11193 if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
11194 outputPacket = false;
11195
11196 if (outputPacket)
11197 m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
11198 }
11179 11199
11180 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); 11200 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting);
11181 } 11201 }
@@ -11246,15 +11266,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11246 /// Entryway from the client to the simulator. All UDP packets from the client will end up here 11266 /// Entryway from the client to the simulator. All UDP packets from the client will end up here
11247 /// </summary> 11267 /// </summary>
11248 /// <param name="Pack">OpenMetaverse.packet</param> 11268 /// <param name="Pack">OpenMetaverse.packet</param>
11249 public void ProcessInPacket(Packet Pack) 11269 public void ProcessInPacket(Packet packet)
11250 { 11270 {
11251 if (m_debugPacketLevel >= 255) 11271 if (m_debugPacketLevel > 0)
11252 m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type); 11272 {
11273 bool outputPacket = true;
11274
11275 if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
11276 outputPacket = false;
11277
11278 if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
11279 outputPacket = false;
11280
11281 if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
11282 outputPacket = false;
11283
11284 if (outputPacket)
11285 m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
11286 }
11253 11287
11254 if (!ProcessPacketMethod(Pack)) 11288 if (!ProcessPacketMethod(packet))
11255 m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type); 11289 m_log.Warn("[CLIENT]: unhandled packet " + packet.Type);
11256 11290
11257 PacketPool.Instance.ReturnPacket(Pack); 11291 PacketPool.Instance.ReturnPacket(packet);
11258 } 11292 }
11259 11293
11260 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) 11294 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)