From 09f4e72d6af4b86238af516b1719ff4f63aa7174 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 29 Oct 2012 23:22:40 +0000 Subject: Fix memory leak where removing an NPC did not remove its circuits. This was because we were removing by circuitcode where NPCs have no code. Now removing by agent ID instead. This commit also fixes the "show circuits" console command to work properly where the circuit has no associated IP address. --- OpenSim/Region/Application/OpenSim.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index b24641a..2236e43 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -1111,7 +1111,7 @@ namespace OpenSim aCircuit.Name, aCircuit.child ? "child" : "root", aCircuit.circuitcode.ToString(), - aCircuit.IPAddress.ToString(), + aCircuit.IPAddress != null ? aCircuit.IPAddress.ToString() : "not set", aCircuit.Viewer); }); -- cgit v1.1 From 8c130bcaf5a60fa042d8df38ba1d1e1cb328d768 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Nov 2012 22:50:28 +0000 Subject: Remove the old style module loader and all references to it --- OpenSim/Region/Application/OpenSim.cs | 47 +++-------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 2236e43..47252f6 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -757,33 +757,13 @@ namespace OpenSim switch (cmdparams[0].ToLower()) { case "list": - foreach (IRegionModule irm in m_moduleLoader.GetLoadedSharedModules) - { - MainConsole.Instance.Output(String.Format("Shared region module: {0}", irm.Name)); - } + //TODO: Convert to new region modules break; case "unload": - if (cmdparams.Length > 1) - { - foreach (IRegionModule rm in new ArrayList(m_moduleLoader.GetLoadedSharedModules)) - { - if (rm.Name.ToLower() == cmdparams[1].ToLower()) - { - MainConsole.Instance.Output(String.Format("Unloading module: {0}", rm.Name)); - m_moduleLoader.UnloadModule(rm); - } - } - } + //TODO: Convert to new region modules break; case "load": - if (cmdparams.Length > 1) - { - foreach (Scene s in new ArrayList(SceneManager.Scenes)) - { - MainConsole.Instance.Output(String.Format("Loading module: {0}", cmdparams[1])); - m_moduleLoader.LoadRegionModules(cmdparams[1], s); - } - } + //TODO: Convert to new region modules break; } } @@ -1018,28 +998,9 @@ namespace OpenSim break; case "modules": - MainConsole.Instance.Output("The currently loaded shared modules are:"); - foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) - { - MainConsole.Instance.Output("Shared Module: " + module.Name); - } - - SceneManager.ForEachScene( - delegate(Scene scene) { - m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:"); - foreach (IRegionModule module in scene.Modules.Values) - { - if (!module.IsSharedModule) - { - m_log.Error("Region Module: " + module.Name); - } - } - } - ); - SceneManager.ForEachScene( delegate(Scene scene) { - MainConsole.Instance.Output("Loaded new region modules in" + scene.RegionInfo.RegionName + " are:"); + MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:"); foreach (IRegionModuleBase module in scene.RegionModules.Values) { Type type = module.GetType().GetInterface("ISharedRegionModule"); -- cgit v1.1 From 45d1e6ab09309e21f96979548b5d1b4904800f65 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Nov 2012 04:45:53 +0000 Subject: Make "show info" command available across all servers This helpfully lists version information, startup location and console log level --- OpenSim/Region/Application/OpenSim.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 47252f6..e5aecbc 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -106,22 +106,6 @@ namespace OpenSim m_timeInterval = startupConfig.GetInt("timer_Interval", 1200); } - if (m_logFileAppender != null) - { - if (m_logFileAppender is log4net.Appender.FileAppender) - { - log4net.Appender.FileAppender appender = - (log4net.Appender.FileAppender)m_logFileAppender; - string fileName = startupConfig.GetString("LogFile", String.Empty); - if (fileName != String.Empty) - { - appender.File = fileName; - appender.ActivateOptions(); - } - m_log.InfoFormat("[LOGGING]: Logging started to file {0}", appender.File); - } - } - string asyncCallMethodStr = startupConfig.GetString("async_call_method", String.Empty); FireAndForgetMethod asyncCallMethod; if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse(asyncCallMethodStr, out asyncCallMethod)) @@ -174,6 +158,7 @@ namespace OpenSim MainConsole.Instance = m_console; + RegisterCommonAppenders(m_config.Source.Configs["Startup"]); RegisterConsoleCommands(); base.StartupSpecific(); -- cgit v1.1 From 9fcf3f1a3f3457debf0f59ba7659492b44172b99 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Nov 2012 05:48:41 +0000 Subject: Make "config show/set/get/save" console commands available on all servers --- OpenSim/Region/Application/OpenSim.cs | 134 ++-------------------------------- 1 file changed, 6 insertions(+), 128 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index e5aecbc..e654cf7 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -82,8 +82,8 @@ namespace OpenSim { base.ReadExtraConfigSettings(); - IConfig startupConfig = m_config.Source.Configs["Startup"]; - IConfig networkConfig = m_config.Source.Configs["Network"]; + IConfig startupConfig = Config.Configs["Startup"]; + IConfig networkConfig = Config.Configs["Network"]; int stpMaxThreads = 15; @@ -148,7 +148,7 @@ namespace OpenSim break; case "rest": m_console = new RemoteConsole("Region"); - ((RemoteConsole)m_console).ReadConfig(m_config.Source); + ((RemoteConsole)m_console).ReadConfig(Config); break; default: m_console = new LocalConsole("Region"); @@ -158,7 +158,7 @@ namespace OpenSim MainConsole.Instance = m_console; - RegisterCommonAppenders(m_config.Source.Configs["Startup"]); + RegisterCommonAppenders(Config.Configs["Startup"]); RegisterConsoleCommands(); base.StartupSpecific(); @@ -357,26 +357,6 @@ namespace OpenSim "restart", "Restart all sims in this instance", RunCommand); - m_console.Commands.AddCommand("General", false, "config set", - "config set
", - "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig); - - m_console.Commands.AddCommand("General", false, "config get", - "config get [
] []", - "Synonym for config show", - HandleConfig); - - m_console.Commands.AddCommand("General", false, "config show", - "config show [
] []", - "Show config information", - "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine - + "If a section is given but not a field, then all fields in that section are printed.", - HandleConfig); - - m_console.Commands.AddCommand("General", false, "config save", - "config save ", - "Save current configuration to a file at the given path", HandleConfig); - m_console.Commands.AddCommand("General", false, "command-script", "command-script