From 120114e96becc6fee1311300359dcefaf4013c0e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 17 Oct 2011 20:50:29 +0100
Subject: refactor: Make IClientAPI.DebugPacketFormat a property rather than a
setter without a getter
---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 25 +++++++++-------------
OpenSim/Region/Framework/Scenes/SceneManager.cs | 2 +-
.../Server/IRCClientView.cs | 5 +----
.../Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 +---
4 files changed, 13 insertions(+), 23 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 95532e8..7affa45 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
/// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
///
- protected int m_debugPacketLevel = 0;
+ public int DebugPacketLevel { get; set; }
#region Events
@@ -477,11 +477,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
RegisterLocalPacketHandlers();
}
- public void SetDebugPacketLevel(int newDebug)
- {
- m_debugPacketLevel = newDebug;
- }
-
#region Client Methods
///
@@ -11595,25 +11590,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// provide your own method.
protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting, UnackedPacketMethod method)
{
- if (m_debugPacketLevel > 0)
+ if (DebugPacketLevel > 0)
{
bool logPacket = true;
- if (m_debugPacketLevel <= 255
+ if (DebugPacketLevel <= 255
&& (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
logPacket = false;
- if (m_debugPacketLevel <= 200
+ if (DebugPacketLevel <= 200
&& (packet.Type == PacketType.ImagePacket
|| packet.Type == PacketType.ImageData
|| packet.Type == PacketType.LayerData
|| packet.Type == PacketType.CoarseLocationUpdate))
logPacket = false;
- if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
+ if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
logPacket = false;
- if (m_debugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate)
+ if (DebugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate)
logPacket = false;
if (logPacket)
@@ -11658,17 +11653,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// OpenMetaverse.packet
public void ProcessInPacket(Packet packet)
{
- if (m_debugPacketLevel > 0)
+ if (DebugPacketLevel > 0)
{
bool outputPacket = true;
- if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
+ if (DebugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
outputPacket = false;
- if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
+ if (DebugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
outputPacket = false;
- if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
+ if (DebugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
outputPacket = false;
if (outputPacket)
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 7fada4b..c91744c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -466,7 +466,7 @@ namespace OpenSim.Region.Framework.Scenes
scenePresence.Lastname,
newDebug);
- scenePresence.ControllingClient.SetDebugPacketLevel(newDebug);
+ scenePresence.ControllingClient.DebugPacketLevel = newDebug;
}
});
}
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 84f45a8..8e9647e 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -866,10 +866,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
#pragma warning restore 67
- public void SetDebugPacketLevel(int newDebug)
- {
-
- }
+ public int DebugPacketLevel { get; set; }
public void InPacket(object NewPack)
{
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 73d8828..ee9a4c1 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -823,9 +823,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
- public void SetDebugPacketLevel(int newDebug)
- {
- }
+ public int DebugPacketLevel { get; set; }
public void InPacket(object NewPack)
{
--
cgit v1.1