* minor: change m_debug to m_debugPacketLevel since that's what it is

0.6.0-stable
Justin Clarke Casey 2008-10-14 18:53:56 +00:00
parent 0d6eb37ac5
commit 58f8c042f6
6 changed files with 30 additions and 19 deletions

View File

@ -836,8 +836,12 @@ namespace OpenSim.Framework
byte[] GetThrottlesPacked(float multiplier); byte[] GetThrottlesPacked(float multiplier);
/// <summary>
/// Set the debug level at which packet output should be printed to console.
/// </summary>
/// <param name="newDebugPacketLevel"></param>
void SetDebugPacketLevel(int newDebug);
void SetDebug(int newDebug);
void InPacket(object NewPack); void InPacket(object NewPack);
void ProcessInPacket(Packet NewPack); void ProcessInPacket(Packet NewPack);
void Close(bool ShutdownCircuit); void Close(bool ShutdownCircuit);

View File

@ -555,11 +555,11 @@ namespace OpenSim
int newDebug; int newDebug;
if (int.TryParse(args[1], out newDebug)) if (int.TryParse(args[1], out newDebug))
{ {
m_sceneManager.SetDebugPacketOnCurrentScene(newDebug); m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug);
} }
else 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()); m_console.Notice("New packet debug: " + newDebug.ToString());
} }

View File

@ -67,7 +67,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private readonly UUID m_sessionId; private readonly UUID m_sessionId;
private UUID m_secureSessionId = UUID.Zero; private UUID m_secureSessionId = UUID.Zero;
//private AgentAssetUpload UploadAssets; //private AgentAssetUpload UploadAssets;
private int m_debug = 0;
private int m_debugPacketLevel = 0;
private readonly AssetCache m_assetCache; private readonly AssetCache m_assetCache;
// private InventoryCache m_inventoryCache; // private InventoryCache m_inventoryCache;
private int m_cachedTextureSerial = 0; private int m_cachedTextureSerial = 0;
@ -447,9 +449,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ThreadTracker.Add(m_clientThread); ThreadTracker.Add(m_clientThread);
} }
public void SetDebug(int newDebug) public void SetDebugPacketLevel(int newDebugPacketLevel)
{ {
m_debug = newDebug; m_debugPacketLevel = newDebugPacketLevel;
} }
# region Client Methods # region Client Methods
@ -632,23 +634,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected void DebugPacket(string direction, Packet packet) protected void DebugPacket(string direction, Packet packet)
{ {
if (m_debug > 0) if (m_debugPacketLevel > 0)
{ {
string info = String.Empty; string info = String.Empty;
if (m_debug < 255 && packet.Type == PacketType.AgentUpdate) if (m_debugPacketLevel < 255 && packet.Type == PacketType.AgentUpdate)
return; return;
if (m_debug < 254 && packet.Type == PacketType.ViewerEffect) if (m_debugPacketLevel < 254 && packet.Type == PacketType.ViewerEffect)
return; return;
if (m_debug < 253 && ( if (m_debugPacketLevel < 253 && (
packet.Type == PacketType.CompletePingCheck || packet.Type == PacketType.CompletePingCheck ||
packet.Type == PacketType.StartPingCheck packet.Type == PacketType.StartPingCheck
)) ))
return; return;
if (m_debug < 252 && packet.Type == PacketType.PacketAck) if (m_debugPacketLevel < 252 && packet.Type == PacketType.PacketAck)
return; return;
if (m_debug > 1) if (m_debugPacketLevel > 1)
{ {
info = packet.ToString(); info = packet.ToString();
} }
@ -2360,8 +2362,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
terse.ObjectData[0] = terseBlock; terse.ObjectData[0] = terseBlock;
terse.Header.Reliable = false; terse.Header.Reliable = false;
terse.Header.Zerocoded = true; terse.Header.Zerocoded = true;
OutPacket(terse, ThrottleOutPacketType.Task); OutPacket(terse, ThrottleOutPacketType.Task);
} }

View File

@ -758,7 +758,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
{ {
} }
public void SetDebug(int newDebug) public void SetDebugPacketLevel(int newDebug)
{ {
} }

View File

@ -394,7 +394,12 @@ namespace OpenSim.Region.Environment.Scenes
return false; return false;
} }
public void SetDebugPacketOnCurrentScene(int newDebug) /// <summary>
/// Set the debug packet level on the current scene. This level governs which packets are printed out to the
/// console.
/// </summary>
/// <param name="newDebug"></param>
public void SetDebugPacketLevelOnCurrentScene(int newDebug)
{ {
ForEachCurrentScene(delegate(Scene scene) ForEachCurrentScene(delegate(Scene scene)
{ {
@ -409,7 +414,7 @@ namespace OpenSim.Region.Environment.Scenes
scenePresence.Lastname, scenePresence.Lastname,
newDebug); newDebug);
scenePresence.ControllingClient.SetDebug(newDebug); scenePresence.ControllingClient.SetDebugPacketLevel(newDebug);
} }
} }
}); });

View File

@ -746,7 +746,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{ {
} }
public void SetDebug(int newDebug) public void SetDebugPacketLevel(int newDebug)
{ {
} }