aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorBlueWall2011-02-12 20:42:11 -0500
committerBlueWall2011-02-12 20:42:11 -0500
commitc0e1742d479d4390701688da685892555f28bfbc (patch)
tree39d717dd9ce4c453898eca2237f9fc2d2879c1d4 /OpenSim/Region/Application
parentMerge branch 'master' of /home/opensim/src/OpenSim/Core (diff)
parentFixed a couple of tests in the HttpServer. Not sure if this is enough. Mantis... (diff)
downloadopensim-SC-c0e1742d479d4390701688da685892555f28bfbc.zip
opensim-SC-c0e1742d479d4390701688da685892555f28bfbc.tar.gz
opensim-SC-c0e1742d479d4390701688da685892555f28bfbc.tar.bz2
opensim-SC-c0e1742d479d4390701688da685892555f28bfbc.tar.xz
Merge branch 'master' of /home/opensim/src/OpenSim/Core
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs77
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs12
2 files changed, 83 insertions, 6 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index ed4b620..4081888 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -294,6 +294,18 @@ namespace OpenSim
294 "show connections", 294 "show connections",
295 "Show connection data", HandleShow); 295 "Show connection data", HandleShow);
296 296
297 m_console.Commands.AddCommand("region", false, "show circuits",
298 "show circuits",
299 "Show agent circuit data", HandleShow);
300
301 m_console.Commands.AddCommand("region", false, "show http-handlers",
302 "show http-handlers",
303 "Show all registered http handlers", HandleShow);
304
305 m_console.Commands.AddCommand("region", false, "show pending-objects",
306 "show pending-objects",
307 "Show # of objects on the pending queues of all scene viewers", HandleShow);
308
297 m_console.Commands.AddCommand("region", false, "show modules", 309 m_console.Commands.AddCommand("region", false, "show modules",
298 "show modules", 310 "show modules",
299 "Show module data", HandleShow); 311 "Show module data", HandleShow);
@@ -943,6 +955,66 @@ namespace OpenSim
943 MainConsole.Instance.Output(connections.ToString()); 955 MainConsole.Instance.Output(connections.ToString());
944 break; 956 break;
945 957
958 case "circuits":
959 System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n");
960 m_sceneManager.ForEachScene(
961 delegate(Scene scene)
962 {
963 //this.HttpServer.
964 acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName);
965 foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.AgentCircuits.Values)
966 acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root"));
967 }
968 );
969
970 MainConsole.Instance.Output(acd.ToString());
971 break;
972
973 case "http-handlers":
974 System.Text.StringBuilder handlers = new System.Text.StringBuilder("Registered HTTP Handlers:\n");
975
976 handlers.AppendFormat("* XMLRPC:\n");
977 foreach (String s in HttpServer.GetXmlRpcHandlerKeys())
978 handlers.AppendFormat("\t{0}\n", s);
979
980 handlers.AppendFormat("* HTTP:\n");
981 List<String> poll = HttpServer.GetPollServiceHandlerKeys();
982 foreach (String s in HttpServer.GetHTTPHandlerKeys())
983 handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty));
984
985 handlers.AppendFormat("* Agent:\n");
986 foreach (String s in HttpServer.GetAgentHandlerKeys())
987 handlers.AppendFormat("\t{0}\n", s);
988
989 handlers.AppendFormat("* LLSD:\n");
990 foreach (String s in HttpServer.GetLLSDHandlerKeys())
991 handlers.AppendFormat("\t{0}\n", s);
992
993 handlers.AppendFormat("* StreamHandlers ({0}):\n", HttpServer.GetStreamHandlerKeys().Count);
994 foreach (String s in HttpServer.GetStreamHandlerKeys())
995 handlers.AppendFormat("\t{0}\n", s);
996
997 MainConsole.Instance.Output(handlers.ToString());
998 break;
999
1000 case "pending-objects":
1001 System.Text.StringBuilder pending = new System.Text.StringBuilder("Pending objects:\n");
1002 m_sceneManager.ForEachScene(
1003 delegate(Scene scene)
1004 {
1005 scene.ForEachScenePresence(
1006 delegate(ScenePresence sp)
1007 {
1008 pending.AppendFormat("{0}: {1} {2} pending\n",
1009 scene.RegionInfo.RegionName, sp.Name, sp.SceneViewer.GetPendingObjectsCount());
1010 }
1011 );
1012 }
1013 );
1014
1015 MainConsole.Instance.Output(pending.ToString());
1016 break;
1017
946 case "modules": 1018 case "modules":
947 MainConsole.Instance.Output("The currently loaded shared modules are:"); 1019 MainConsole.Instance.Output("The currently loaded shared modules are:");
948 foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) 1020 foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
@@ -958,11 +1030,12 @@ namespace OpenSim
958 delegate(Scene scene) 1030 delegate(Scene scene)
959 { 1031 {
960 MainConsole.Instance.Output(String.Format( 1032 MainConsole.Instance.Output(String.Format(
961 "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", 1033 "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}",
962 scene.RegionInfo.RegionName, 1034 scene.RegionInfo.RegionName,
963 scene.RegionInfo.RegionLocX, 1035 scene.RegionInfo.RegionLocX,
964 scene.RegionInfo.RegionLocY, 1036 scene.RegionInfo.RegionLocY,
965 scene.RegionInfo.InternalEndPoint.Port)); 1037 scene.RegionInfo.InternalEndPoint.Port,
1038 scene.RegionInfo.EstateSettings.EstateName));
966 }); 1039 });
967 break; 1040 break;
968 1041
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 1652b82..e950613 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -795,9 +795,7 @@ namespace OpenSim
795 /// <summary> 795 /// <summary>
796 /// Load the estate information for the provided RegionInfo object. 796 /// Load the estate information for the provided RegionInfo object.
797 /// </summary> 797 /// </summary>
798 /// <param name="regInfo"> 798 /// <param name="regInfo"></param>
799 /// A <see cref="RegionInfo"/>
800 /// </param>
801 public void PopulateRegionEstateInfo(RegionInfo regInfo) 799 public void PopulateRegionEstateInfo(RegionInfo regInfo)
802 { 800 {
803 IEstateDataService estateDataService = EstateDataService; 801 IEstateDataService estateDataService = EstateDataService;
@@ -819,7 +817,13 @@ namespace OpenSim
819 regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, true); 817 regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, true);
820 818
821 regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); 819 regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
822 //regInfo.EstateSettings.Save(); 820
821 // FIXME: Later on, the scene constructor will reload the estate settings no matter what.
822 // Therefore, we need to do an initial save here otherwise the new estate name will be reset
823 // back to the default. The reloading of estate settings by scene could be eliminated if it
824 // knows that the passed in settings in RegionInfo are already valid. Also, it might be
825 // possible to eliminate some additional later saves made by callers of this method.
826 regInfo.EstateSettings.Save();
823 break; 827 break;
824 } 828 }
825 else 829 else