aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2011-02-05 19:21:12 -0800
committerDiva Canto2011-02-05 19:21:12 -0800
commit30fa5ad1e29df50de99611b43adfd577696bfdda (patch)
tree7f9ae4a0d0a807e68b3483a9f82c4c21044e2404 /OpenSim
parentAdded a couple of console commands to help diagnose issues: (diff)
downloadopensim-SC-30fa5ad1e29df50de99611b43adfd577696bfdda.zip
opensim-SC-30fa5ad1e29df50de99611b43adfd577696bfdda.tar.gz
opensim-SC-30fa5ad1e29df50de99611b43adfd577696bfdda.tar.bz2
opensim-SC-30fa5ad1e29df50de99611b43adfd577696bfdda.tar.xz
One more diagnosis command:
show caps
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs28
1 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index c023a6f..75df6cc 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -26,12 +26,14 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using System.Reflection; 31using System.Reflection;
31using log4net; 32using log4net;
32using Nini.Config; 33using Nini.Config;
33using OpenMetaverse; 34using OpenMetaverse;
34using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Console;
35using OpenSim.Region.Framework.Interfaces; 37using OpenSim.Region.Framework.Interfaces;
36using OpenSim.Region.Framework.Scenes; 38using OpenSim.Region.Framework.Scenes;
37using Caps=OpenSim.Framework.Capabilities.Caps; 39using Caps=OpenSim.Framework.Capabilities.Caps;
@@ -61,6 +63,10 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
61 { 63 {
62 m_scene = scene; 64 m_scene = scene;
63 m_scene.RegisterModuleInterface<ICapabilitiesModule>(this); 65 m_scene.RegisterModuleInterface<ICapabilitiesModule>(this);
66 MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps",
67 "show capabilities",
68 "Shows all registered capabilities", CapabilitiesCommand);
69 m_log.Error("\n\n**************************************************************\n\n");
64 } 70 }
65 71
66 public void RegionLoaded(Scene scene) 72 public void RegionLoaded(Scene scene)
@@ -72,7 +78,9 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
72 m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this); 78 m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this);
73 } 79 }
74 80
75 public void PostInitialise() {} 81 public void PostInitialise()
82 {
83 }
76 84
77 public void Close() {} 85 public void Close() {}
78 86
@@ -226,5 +234,23 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
226 m_log.Info(" >> "+x+", "+y+": "+kvp.Value); 234 m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
227 } 235 }
228 } 236 }
237
238 private void CapabilitiesCommand(string module, string[] cmdparams)
239 {
240 System.Text.StringBuilder caps = new System.Text.StringBuilder();
241 caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName);
242
243 foreach (KeyValuePair<UUID, Caps> kvp in m_capsHandlers)
244 {
245 caps.AppendFormat("** User {0}:\n", kvp.Key);
246 for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); )
247 {
248 Uri uri = new Uri(kvp2.Value.ToString());
249 caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery);
250 }
251 }
252
253 MainConsole.Instance.Output(caps.ToString());
254 }
229 } 255 }
230} 256}