aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2011-10-25 02:54:41 +0100
committerMelanie2011-10-25 02:54:41 +0100
commit0cbba1da8dc32e051df14d4a0a12e059bd55927c (patch)
tree9bf1ffca765e83cefa0b75cafad56e6ca99813c2 /OpenSim/Region
parentMerge commit '120114e96becc6fee1311300359dcefaf4013c0e' into bigmerge (diff)
parentAllow an avatar to be explicitly named to the "debug packet" command (diff)
downloadopensim-SC-0cbba1da8dc32e051df14d4a0a12e059bd55927c.zip
opensim-SC-0cbba1da8dc32e051df14d4a0a12e059bd55927c.tar.gz
opensim-SC-0cbba1da8dc32e051df14d4a0a12e059bd55927c.tar.bz2
opensim-SC-0cbba1da8dc32e051df14d4a0a12e059bd55927c.tar.xz
Merge commit 'aeb4ff02744573cb91e8991bf9df81412b80e156' into bigmerge
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs5
2 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 9d3a1cd..e7ee8c4 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -216,14 +216,15 @@ namespace OpenSim
216 HandleForceUpdate); 216 HandleForceUpdate);
217 217
218 m_console.Commands.AddCommand("region", false, "debug packet", 218 m_console.Commands.AddCommand("region", false, "debug packet",
219 "debug packet <level>", 219 "debug packet <level> [<avatar-first-name> <avatar-last-name>]",
220 "Turn on packet debugging", 220 "Turn on packet debugging",
221 "If level > 255 then all incoming and outgoing packets are logged.\n" 221 "If level > 255 then all incoming and outgoing packets are logged.\n"
222 + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" 222 + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n"
223 + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" 223 + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n"
224 + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" 224 + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n"
225 + "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n" 225 + "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n"
226 + "If level <= 0 then no packets are logged.", 226 + "If level <= 0 then no packets are logged.\n"
227 + "If an avatar name is given then only packets from that avatar are logged",
227 Debug); 228 Debug);
228 229
229 m_console.Commands.AddCommand("region", false, "debug scene", 230 m_console.Commands.AddCommand("region", false, "debug scene",
@@ -845,18 +846,21 @@ namespace OpenSim
845 switch (args[1]) 846 switch (args[1])
846 { 847 {
847 case "packet": 848 case "packet":
849 string name = null;
850 if (args.Length == 5)
851 name = string.Format("{0} {1}", args[3], args[4]);
852
848 if (args.Length > 2) 853 if (args.Length > 2)
849 { 854 {
850 int newDebug; 855 int newDebug;
851 if (int.TryParse(args[2], out newDebug)) 856 if (int.TryParse(args[2], out newDebug))
852 { 857 {
853 m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug); 858 m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name);
854 } 859 }
855 else 860 else
856 { 861 {
857 MainConsole.Instance.Output("packet debug should be 0..255"); 862 MainConsole.Instance.Output("packet debug should be 0..255");
858 } 863 }
859 MainConsole.Instance.Output(String.Format("New packet debug: {0}", newDebug));
860 } 864 }
861 865
862 break; 866 break;
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index c91744c..a58b87d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -452,14 +452,15 @@ namespace OpenSim.Region.Framework.Scenes
452 /// console. 452 /// console.
453 /// </summary> 453 /// </summary>
454 /// <param name="newDebug"></param> 454 /// <param name="newDebug"></param>
455 public void SetDebugPacketLevelOnCurrentScene(int newDebug) 455 /// <param name="name">Name of avatar to debug</param>
456 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
456 { 457 {
457 ForEachCurrentScene( 458 ForEachCurrentScene(
458 delegate(Scene scene) 459 delegate(Scene scene)
459 { 460 {
460 scene.ForEachScenePresence(delegate(ScenePresence scenePresence) 461 scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
461 { 462 {
462 if (!scenePresence.IsChildAgent) 463 if (!scenePresence.IsChildAgent && (name == null || scenePresence.Name == name))
463 { 464 {
464 m_log.DebugFormat("Packet debug for {0} {1} set to {2}", 465 m_log.DebugFormat("Packet debug for {0} {1} set to {2}",
465 scenePresence.Firstname, 466 scenePresence.Firstname,