mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector
|
||||
{
|
||||
/// <value>
|
||||
/// 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.
|
||||
/// </value>
|
||||
protected int m_debugPacketLevel = 0;
|
||||
|
||||
@@ -11229,8 +11229,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
/// handles splitting manually</param>
|
||||
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);
|
||||
}
|
||||
@@ -11316,26 +11336,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
/// Entryway from the client to the simulator. All UDP packets from the client will end up here
|
||||
/// </summary>
|
||||
/// <param name="Pack">OpenMetaverse.packet</param>
|
||||
public void ProcessInPacket(Packet Pack)
|
||||
public void ProcessInPacket(Packet packet)
|
||||
{
|
||||
if (!m_IsPresenceReady)
|
||||
if (m_debugPacketLevel > 0)
|
||||
{
|
||||
if (m_pendingPackets == null)
|
||||
{
|
||||
m_pendingPackets = new List<Packet>();
|
||||
}
|
||||
m_pendingPackets.Add(Pack);
|
||||
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);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_debugPacketLevel >= 255)
|
||||
m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.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)
|
||||
|
||||
Reference in New Issue
Block a user