aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-17 20:50:29 +0100
committerJustin Clark-Casey (justincc)2011-10-17 20:50:29 +0100
commit120114e96becc6fee1311300359dcefaf4013c0e (patch)
treeb03fd72833eb974da4eb4ac8795cf74c69cd0770
parentAdd avatar names to debug packet output (diff)
downloadopensim-SC_OLD-120114e96becc6fee1311300359dcefaf4013c0e.zip
opensim-SC_OLD-120114e96becc6fee1311300359dcefaf4013c0e.tar.gz
opensim-SC_OLD-120114e96becc6fee1311300359dcefaf4013c0e.tar.bz2
opensim-SC_OLD-120114e96becc6fee1311300359dcefaf4013c0e.tar.xz
refactor: Make IClientAPI.DebugPacketFormat a property rather than a setter without a getter
-rw-r--r--OpenSim/Framework/IClientAPI.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs25
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs5
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs4
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs4
6 files changed, 16 insertions, 28 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index c1770a1..1be92ff 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1006,11 +1006,11 @@ namespace OpenSim.Framework
1006 event MuteListEntryRemove OnRemoveMuteListEntry; 1006 event MuteListEntryRemove OnRemoveMuteListEntry;
1007 event GodlikeMessage onGodlikeMessage; 1007 event GodlikeMessage onGodlikeMessage;
1008 event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 1008 event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
1009 1009
1010 /// <summary> 1010 /// <summary>
1011 /// Set the debug level at which packet output should be printed to console. 1011 /// Set the debug level at which packet output should be printed to console.
1012 /// </summary> 1012 /// </summary>
1013 void SetDebugPacketLevel(int newDebug); 1013 int DebugPacketLevel { get; set; }
1014 1014
1015 void InPacket(object NewPack); 1015 void InPacket(object NewPack);
1016 void ProcessInPacket(Packet NewPack); 1016 void ProcessInPacket(Packet NewPack);
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
64 /// <value> 64 /// <value>
65 /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. 65 /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
66 /// </value> 66 /// </value>
67 protected int m_debugPacketLevel = 0; 67 public int DebugPacketLevel { get; set; }
68 68
69 #region Events 69 #region Events
70 70
@@ -477,11 +477,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
477 RegisterLocalPacketHandlers(); 477 RegisterLocalPacketHandlers();
478 } 478 }
479 479
480 public void SetDebugPacketLevel(int newDebug)
481 {
482 m_debugPacketLevel = newDebug;
483 }
484
485 #region Client Methods 480 #region Client Methods
486 481
487 /// <summary> 482 /// <summary>
@@ -11595,25 +11590,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11595 /// provide your own method.</param> 11590 /// provide your own method.</param>
11596 protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting, UnackedPacketMethod method) 11591 protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting, UnackedPacketMethod method)
11597 { 11592 {
11598 if (m_debugPacketLevel > 0) 11593 if (DebugPacketLevel > 0)
11599 { 11594 {
11600 bool logPacket = true; 11595 bool logPacket = true;
11601 11596
11602 if (m_debugPacketLevel <= 255 11597 if (DebugPacketLevel <= 255
11603 && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage)) 11598 && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
11604 logPacket = false; 11599 logPacket = false;
11605 11600
11606 if (m_debugPacketLevel <= 200 11601 if (DebugPacketLevel <= 200
11607 && (packet.Type == PacketType.ImagePacket 11602 && (packet.Type == PacketType.ImagePacket
11608 || packet.Type == PacketType.ImageData 11603 || packet.Type == PacketType.ImageData
11609 || packet.Type == PacketType.LayerData 11604 || packet.Type == PacketType.LayerData
11610 || packet.Type == PacketType.CoarseLocationUpdate)) 11605 || packet.Type == PacketType.CoarseLocationUpdate))
11611 logPacket = false; 11606 logPacket = false;
11612 11607
11613 if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) 11608 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
11614 logPacket = false; 11609 logPacket = false;
11615 11610
11616 if (m_debugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate) 11611 if (DebugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate)
11617 logPacket = false; 11612 logPacket = false;
11618 11613
11619 if (logPacket) 11614 if (logPacket)
@@ -11658,17 +11653,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11658 /// <param name="Pack">OpenMetaverse.packet</param> 11653 /// <param name="Pack">OpenMetaverse.packet</param>
11659 public void ProcessInPacket(Packet packet) 11654 public void ProcessInPacket(Packet packet)
11660 { 11655 {
11661 if (m_debugPacketLevel > 0) 11656 if (DebugPacketLevel > 0)
11662 { 11657 {
11663 bool outputPacket = true; 11658 bool outputPacket = true;
11664 11659
11665 if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate) 11660 if (DebugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
11666 outputPacket = false; 11661 outputPacket = false;
11667 11662
11668 if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage) 11663 if (DebugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
11669 outputPacket = false; 11664 outputPacket = false;
11670 11665
11671 if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) 11666 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
11672 outputPacket = false; 11667 outputPacket = false;
11673 11668
11674 if (outputPacket) 11669 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
466 scenePresence.Lastname, 466 scenePresence.Lastname,
467 newDebug); 467 newDebug);
468 468
469 scenePresence.ControllingClient.SetDebugPacketLevel(newDebug); 469 scenePresence.ControllingClient.DebugPacketLevel = newDebug;
470 } 470 }
471 }); 471 });
472 } 472 }
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
866 866
867#pragma warning restore 67 867#pragma warning restore 67
868 868
869 public void SetDebugPacketLevel(int newDebug) 869 public int DebugPacketLevel { get; set; }
870 {
871
872 }
873 870
874 public void InPacket(object NewPack) 871 public void InPacket(object NewPack)
875 { 872 {
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
823 { 823 {
824 } 824 }
825 825
826 public void SetDebugPacketLevel(int newDebug) 826 public int DebugPacketLevel { get; set; }
827 {
828 }
829 827
830 public void InPacket(object NewPack) 828 public void InPacket(object NewPack)
831 { 829 {
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index f75a815..578e3ed 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -873,9 +873,7 @@ namespace OpenSim.Tests.Common.Mock
873 { 873 {
874 } 874 }
875 875
876 public void SetDebugPacketLevel(int newDebug) 876 public int DebugPacketLevel { get; set; }
877 {
878 }
879 877
880 public void InPacket(object NewPack) 878 public void InPacket(object NewPack)
881 { 879 {