From 58f8c042f616c2568496aeb13428230deb854db0 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 14 Oct 2008 18:53:56 +0000
Subject: * minor: change m_debug to m_debugPacketLevel since that's what it is
---
OpenSim/Framework/IClientAPI.cs | 8 ++++++--
OpenSim/Region/Application/OpenSim.cs | 4 ++--
.../Region/ClientStack/LindenUDP/LLClientView.cs | 24 ++++++++++++----------
.../Environment/Modules/World/NPC/NPCAvatar.cs | 2 +-
OpenSim/Region/Environment/Scenes/SceneManager.cs | 9 ++++++--
.../Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +-
6 files changed, 30 insertions(+), 19 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 1c6d363..bacdc62 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -836,8 +836,12 @@ namespace OpenSim.Framework
byte[] GetThrottlesPacked(float multiplier);
-
- void SetDebug(int newDebug);
+ ///
+ /// Set the debug level at which packet output should be printed to console.
+ ///
+ ///
+ void SetDebugPacketLevel(int newDebug);
+
void InPacket(object NewPack);
void ProcessInPacket(Packet NewPack);
void Close(bool ShutdownCircuit);
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index c877aad..93d56bc 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -555,11 +555,11 @@ namespace OpenSim
int newDebug;
if (int.TryParse(args[1], out newDebug))
{
- m_sceneManager.SetDebugPacketOnCurrentScene(newDebug);
+ m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug);
}
else
{
- m_console.Error("packet debug should be 0..2");
+ m_console.Error("packet debug should be 0..255");
}
m_console.Notice("New packet debug: " + newDebug.ToString());
}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index e1c02e9..476b3d5 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -67,7 +67,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private readonly UUID m_sessionId;
private UUID m_secureSessionId = UUID.Zero;
//private AgentAssetUpload UploadAssets;
- private int m_debug = 0;
+
+ private int m_debugPacketLevel = 0;
+
private readonly AssetCache m_assetCache;
// private InventoryCache m_inventoryCache;
private int m_cachedTextureSerial = 0;
@@ -447,9 +449,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ThreadTracker.Add(m_clientThread);
}
- public void SetDebug(int newDebug)
+ public void SetDebugPacketLevel(int newDebugPacketLevel)
{
- m_debug = newDebug;
+ m_debugPacketLevel = newDebugPacketLevel;
}
# region Client Methods
@@ -632,23 +634,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected void DebugPacket(string direction, Packet packet)
{
- if (m_debug > 0)
+ if (m_debugPacketLevel > 0)
{
string info = String.Empty;
- if (m_debug < 255 && packet.Type == PacketType.AgentUpdate)
+ if (m_debugPacketLevel < 255 && packet.Type == PacketType.AgentUpdate)
return;
- if (m_debug < 254 && packet.Type == PacketType.ViewerEffect)
+ if (m_debugPacketLevel < 254 && packet.Type == PacketType.ViewerEffect)
return;
- if (m_debug < 253 && (
+ if (m_debugPacketLevel < 253 && (
packet.Type == PacketType.CompletePingCheck ||
packet.Type == PacketType.StartPingCheck
))
return;
- if (m_debug < 252 && packet.Type == PacketType.PacketAck)
+ if (m_debugPacketLevel < 252 && packet.Type == PacketType.PacketAck)
return;
- if (m_debug > 1)
+ if (m_debugPacketLevel > 1)
{
info = packet.ToString();
}
@@ -2348,7 +2350,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Vector3 velocity, Quaternion rotation)
{
if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
- rotation = Quaternion.Identity;
+ rotation = Quaternion.Identity;
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock =
CreateAvatarImprovedBlock(localID, position, velocity, rotation);
@@ -2360,8 +2362,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
terse.ObjectData[0] = terseBlock;
terse.Header.Reliable = false;
-
terse.Header.Zerocoded = true;
+
OutPacket(terse, ThrottleOutPacketType.Task);
}
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 35a6c2f..0143f2c 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -758,7 +758,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
{
}
- public void SetDebug(int newDebug)
+ public void SetDebugPacketLevel(int newDebug)
{
}
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 472f446..2af31d6 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -394,7 +394,12 @@ namespace OpenSim.Region.Environment.Scenes
return false;
}
- public void SetDebugPacketOnCurrentScene(int newDebug)
+ ///
+ /// Set the debug packet level on the current scene. This level governs which packets are printed out to the
+ /// console.
+ ///
+ ///
+ public void SetDebugPacketLevelOnCurrentScene(int newDebug)
{
ForEachCurrentScene(delegate(Scene scene)
{
@@ -409,7 +414,7 @@ namespace OpenSim.Region.Environment.Scenes
scenePresence.Lastname,
newDebug);
- scenePresence.ControllingClient.SetDebug(newDebug);
+ scenePresence.ControllingClient.SetDebugPacketLevel(newDebug);
}
}
});
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 88de006..0be726d 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -746,7 +746,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
- public void SetDebug(int newDebug)
+ public void SetDebugPacketLevel(int newDebug)
{
}
--
cgit v1.1