aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/EventQueue
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/EventQueue')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs25
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs6
2 files changed, 28 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index f6e501d..37285e3 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -97,6 +97,14 @@ namespace OpenSim.Region.ClientStack.Linden
97 + " >= 1 - turns on outgoing event logging\n" 97 + " >= 1 - turns on outgoing event logging\n"
98 + " >= 2 - turns on poll notification", 98 + " >= 2 - turns on poll notification",
99 HandleDebugEq); 99 HandleDebugEq);
100
101 MainConsole.Instance.Commands.AddCommand(
102 "Debug",
103 false,
104 "show eq",
105 "show eq",
106 "Show contents of event queues for logged in avatars. Used for debugging.",
107 HandleShowEq);
100 } 108 }
101 109
102 public void RemoveRegion(Scene scene) 110 public void RemoveRegion(Scene scene)
@@ -138,7 +146,7 @@ namespace OpenSim.Region.ClientStack.Linden
138 146
139 if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel))) 147 if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel)))
140 { 148 {
141 MainConsole.Instance.OutputFormat("Usage: debug eq [0|1]"); 149 MainConsole.Instance.OutputFormat("Usage: debug eq [0|1|2]");
142 } 150 }
143 else 151 else
144 { 152 {
@@ -148,6 +156,21 @@ namespace OpenSim.Region.ClientStack.Linden
148 } 156 }
149 } 157 }
150 158
159 protected void HandleShowEq(string module, string[] args)
160 {
161 MainConsole.Instance.OutputFormat("For scene {0}", m_scene.Name);
162
163 lock (queues)
164 {
165 foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
166 {
167 MainConsole.Instance.OutputFormat(
168 "For agent {0} there are {1} messages queued for send.",
169 kvp.Key, kvp.Value.Count);
170 }
171 }
172 }
173
151 /// <summary> 174 /// <summary>
152 /// Always returns a valid queue 175 /// Always returns a valid queue
153 /// </summary> 176 /// </summary>
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index d604cf6..141af8a 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -44,13 +44,15 @@ using OpenSim.Tests.Common.Mock;
44namespace OpenSim.Region.ClientStack.Linden.Tests 44namespace OpenSim.Region.ClientStack.Linden.Tests
45{ 45{
46 [TestFixture] 46 [TestFixture]
47 public class EventQueueTests 47 public class EventQueueTests : OpenSimTestCase
48 { 48 {
49 private TestScene m_scene; 49 private TestScene m_scene;
50 50
51 [SetUp] 51 [SetUp]
52 public void SetUp() 52 public override void SetUp()
53 { 53 {
54 base.SetUp();
55
54 uint port = 9999; 56 uint port = 9999;
55 uint sslPort = 9998; 57 uint sslPort = 9998;
56 58