aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs24
1 files changed, 10 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index eeb087f..82458e2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -448,29 +448,25 @@ namespace OpenSim.Region.Framework.Scenes
448 } 448 }
449 449
450 /// <summary> 450 /// <summary>
451 /// Set the debug packet level on the current scene. This level governs which packets are printed out to the 451 /// Set the debug packet level on each current scene. This level governs which packets are printed out to the
452 /// console. 452 /// console.
453 /// </summary> 453 /// </summary>
454 /// <param name="newDebug"></param> 454 /// <param name="newDebug"></param>
455 /// <param name="name">Name of avatar to debug</param> 455 /// <param name="name">Name of avatar to debug</param>
456 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name) 456 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
457 { 457 {
458 ForEachCurrentScene( 458 ForEachCurrentScene(scene =>
459 delegate(Scene scene) 459 scene.ForEachScenePresence(sp =>
460 { 460 {
461 scene.ForEachRootClient(delegate(IClientAPI client) 461 if (name == null || sp.Name == name)
462 { 462 {
463 if (name == null || client.Name == name) 463 m_log.DebugFormat(
464 { 464 "Packet debug for {0} ({1}) set to {2}",
465 m_log.DebugFormat("Packet debug for {0} {1} set to {2}", 465 sp.Name, sp.IsChildAgent ? "child" : "root", newDebug);
466 client.FirstName,
467 client.LastName,
468 newDebug);
469 466
470 client.DebugPacketLevel = newDebug; 467 sp.ControllingClient.DebugPacketLevel = newDebug;
471 } 468 }
472 }); 469 })
473 }
474 ); 470 );
475 } 471 }
476 472