From b8c58e5f9f5957ae5b28bc17b2db2eb9f55dcd7b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 31 Aug 2010 18:27:10 +0100
Subject: 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.
---
.../Region/ClientStack/LindenUDP/LLClientView.cs | 52 ++++++++++++++++++----
1 file changed, 43 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
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
public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector
{
///
- /// Debug packet level. At the moment, only 255 does anything (prints out all in and out packets).
+ /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
///
protected int m_debugPacketLevel = 0;
@@ -11174,8 +11174,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// handles splitting manually
protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting)
{
- if (m_debugPacketLevel >= 255)
- m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
+ if (m_debugPacketLevel > 0)
+ {
+ bool outputPacket = true;
+
+ if (m_debugPacketLevel <= 255
+ && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
+ outputPacket = false;
+
+ if (m_debugPacketLevel <= 200
+ &&
+ (packet.Type == PacketType.ImagePacket
+ || packet.Type == PacketType.ImageData
+ || packet.Type == PacketType.LayerData
+ || packet.Type == PacketType.CoarseLocationUpdate))
+ outputPacket = false;
+
+ if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
+ outputPacket = false;
+
+ if (outputPacket)
+ m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
+ }
m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting);
}
@@ -11246,15 +11266,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Entryway from the client to the simulator. All UDP packets from the client will end up here
///
/// OpenMetaverse.packet
- public void ProcessInPacket(Packet Pack)
+ public void ProcessInPacket(Packet packet)
{
- if (m_debugPacketLevel >= 255)
- m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type);
+ if (m_debugPacketLevel > 0)
+ {
+ bool outputPacket = true;
+
+ if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
+ outputPacket = false;
+
+ if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
+ outputPacket = false;
+
+ if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
+ outputPacket = false;
+
+ if (outputPacket)
+ m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
+ }
- if (!ProcessPacketMethod(Pack))
- m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type);
+ if (!ProcessPacketMethod(packet))
+ m_log.Warn("[CLIENT]: unhandled packet " + packet.Type);
- PacketPool.Instance.ReturnPacket(Pack);
+ PacketPool.Instance.ReturnPacket(packet);
}
private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)
--
cgit v1.1
From ed72396d9b796b8bb084e0db68426eae432123d1 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 2 Sep 2010 19:49:42 +0200
Subject: Show when appearance is sent to an avatar to help track down failure
\to display avatars
---
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index fddb966..3d4269f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3408,6 +3408,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
avp.Sender.IsTrial = false;
avp.Sender.ID = agentID;
+ m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
OutPacket(avp, ThrottleOutPacketType.Task);
}
--
cgit v1.1
From e5936071711e35f9edf44d8393b8ad28ef4023db Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 5 Sep 2010 14:16:42 +0200
Subject: Remove "Dwell" support from core and replace it with calls to methods
on IDwellModule
---
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index a1cd30a..3dea40c 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2687,6 +2687,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
{
+ float dwell = 0.0f;
+ IDwellModule dwellModule = m_scene.RequestModuleInterface();
+ if (dwellModule != null)
+ dwell = dwellModule.GetDwell(land.GlobalID);
ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply);
reply.AgentData.AgentID = m_agentId;
reply.Data.ParcelID = parcelID;
@@ -2711,7 +2715,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
reply.Data.GlobalZ = pos.Z;
reply.Data.SimName = Utils.StringToBytes(info.RegionName);
reply.Data.SnapshotID = land.SnapshotID;
- reply.Data.Dwell = land.Dwell;
+ reply.Data.Dwell = dwell;
reply.Data.SalePrice = land.SalePrice;
reply.Data.AuctionID = (int)land.AuctionID;
--
cgit v1.1