aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Servers/MainServer.cs51
-rw-r--r--OpenSim/Region/Application/OpenSim.cs31
2 files changed, 51 insertions, 31 deletions
diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs
index 1ac0953..b367b12 100644
--- a/OpenSim/Framework/Servers/MainServer.cs
+++ b/OpenSim/Framework/Servers/MainServer.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Net; 31using System.Net;
32using System.Text;
32using log4net; 33using log4net;
33using OpenSim.Framework; 34using OpenSim.Framework;
34using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
@@ -105,6 +106,11 @@ namespace OpenSim.Framework.Servers
105 public static void RegisterHttpConsoleCommands(ICommandConsole console) 106 public static void RegisterHttpConsoleCommands(ICommandConsole console)
106 { 107 {
107 console.Commands.AddCommand( 108 console.Commands.AddCommand(
109 "Comms", false, "show http-handlers",
110 "show http-handlers",
111 "Show all registered http handlers", HandleShowHttpHandlersCommand);
112
113 console.Commands.AddCommand(
108 "Debug", false, "debug http", "debug http [<level>]", 114 "Debug", false, "debug http", "debug http [<level>]",
109 "Turn on inbound non-poll http request debugging.", 115 "Turn on inbound non-poll http request debugging.",
110 "If level <= 0, then no extra logging is done.\n" 116 "If level <= 0, then no extra logging is done.\n"
@@ -142,6 +148,51 @@ namespace OpenSim.Framework.Servers
142 } 148 }
143 } 149 }
144 150
151 private static void HandleShowHttpHandlersCommand(string module, string[] args)
152 {
153 if (args.Length != 2)
154 {
155 MainConsole.Instance.Output("Usage: show http-handlers");
156 return;
157 }
158
159 StringBuilder handlers = new StringBuilder();
160
161 lock (m_Servers)
162 {
163 foreach (BaseHttpServer httpServer in m_Servers.Values)
164 {
165 handlers.AppendFormat(
166 "Registered HTTP Handlers for server at {0}:{1}\n", httpServer.ListenIPAddress, httpServer.Port);
167
168 handlers.AppendFormat("* XMLRPC:\n");
169 foreach (String s in httpServer.GetXmlRpcHandlerKeys())
170 handlers.AppendFormat("\t{0}\n", s);
171
172 handlers.AppendFormat("* HTTP:\n");
173 List<String> poll = httpServer.GetPollServiceHandlerKeys();
174 foreach (String s in httpServer.GetHTTPHandlerKeys())
175 handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty));
176
177 handlers.AppendFormat("* Agent:\n");
178 foreach (String s in httpServer.GetAgentHandlerKeys())
179 handlers.AppendFormat("\t{0}\n", s);
180
181 handlers.AppendFormat("* LLSD:\n");
182 foreach (String s in httpServer.GetLLSDHandlerKeys())
183 handlers.AppendFormat("\t{0}\n", s);
184
185 handlers.AppendFormat("* StreamHandlers ({0}):\n", httpServer.GetStreamHandlerKeys().Count);
186 foreach (String s in httpServer.GetStreamHandlerKeys())
187 handlers.AppendFormat("\t{0}\n", s);
188
189 handlers.Append("\n");
190 }
191 }
192
193 MainConsole.Instance.Output(handlers.ToString());
194 }
195
145 /// <summary> 196 /// <summary>
146 /// Register an already started HTTP server to the collection of known servers. 197 /// Register an already started HTTP server to the collection of known servers.
147 /// </summary> 198 /// </summary>
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 769eea8..ed339fd 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -332,10 +332,6 @@ namespace OpenSim
332 "show circuits", 332 "show circuits",
333 "Show agent circuit data", HandleShow); 333 "Show agent circuit data", HandleShow);
334 334
335 m_console.Commands.AddCommand("Comms", false, "show http-handlers",
336 "show http-handlers",
337 "Show all registered http handlers", HandleShow);
338
339 m_console.Commands.AddCommand("Comms", false, "show pending-objects", 335 m_console.Commands.AddCommand("Comms", false, "show pending-objects",
340 "show pending-objects", 336 "show pending-objects",
341 "Show # of objects on the pending queues of all scene viewers", HandleShow); 337 "Show # of objects on the pending queues of all scene viewers", HandleShow);
@@ -1013,33 +1009,6 @@ namespace OpenSim
1013 HandleShowCircuits(); 1009 HandleShowCircuits();
1014 break; 1010 break;
1015 1011
1016 case "http-handlers":
1017 System.Text.StringBuilder handlers = new System.Text.StringBuilder("Registered HTTP Handlers:\n");
1018
1019 handlers.AppendFormat("* XMLRPC:\n");
1020 foreach (String s in HttpServer.GetXmlRpcHandlerKeys())
1021 handlers.AppendFormat("\t{0}\n", s);
1022
1023 handlers.AppendFormat("* HTTP:\n");
1024 List<String> poll = HttpServer.GetPollServiceHandlerKeys();
1025 foreach (String s in HttpServer.GetHTTPHandlerKeys())
1026 handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty));
1027
1028 handlers.AppendFormat("* Agent:\n");
1029 foreach (String s in HttpServer.GetAgentHandlerKeys())
1030 handlers.AppendFormat("\t{0}\n", s);
1031
1032 handlers.AppendFormat("* LLSD:\n");
1033 foreach (String s in HttpServer.GetLLSDHandlerKeys())
1034 handlers.AppendFormat("\t{0}\n", s);
1035
1036 handlers.AppendFormat("* StreamHandlers ({0}):\n", HttpServer.GetStreamHandlerKeys().Count);
1037 foreach (String s in HttpServer.GetStreamHandlerKeys())
1038 handlers.AppendFormat("\t{0}\n", s);
1039
1040 MainConsole.Instance.Output(handlers.ToString());
1041 break;
1042
1043 case "modules": 1012 case "modules":
1044 MainConsole.Instance.Output("The currently loaded shared modules are:"); 1013 MainConsole.Instance.Output("The currently loaded shared modules are:");
1045 foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) 1014 foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)