From bcbd450fe441e94d6c0f547055b4e95f75a5b0d0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 20 Aug 2012 20:24:54 +0100 Subject: Add --force flag to "kick user" console command to allow bypassing of recent race condition checks. This is to allow a second attempt to remove an avatar even if "show connections" shows them as already inactive (i.e. close has already been attempted once). You should only attempt --force if a normal kick fails. This is partly for diagnostics as we have seen some connections occasionally remain on lbsa plaza even if they are registered as inactive. This is not a permanent solution and may not work anyway - the ultimate solution is to stop this problem from happening in the first place. --- OpenSim/Region/Application/OpenSim.cs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 6bbab35..1fc11f5 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -35,6 +35,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Timers; using log4net; +using NDesk.Options; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -310,8 +311,11 @@ namespace OpenSim "Change the scale of a named prim", HandleEditScale); m_console.Commands.AddCommand("Users", false, "kick user", - "kick user [message]", - "Kick a user off the simulator", KickUserCommand); + "kick user [--force] [message]", + "Kick a user off the simulator", + "The --force option will kick the user without any checks to see whether it's already in the process of closing\n" + + "Only use this option if you are sure the avatar is inactive and a normal kick user operation does not removed them", + KickUserCommand); m_console.Commands.AddCommand("Users", false, "show users", "show users [full]", @@ -453,11 +457,17 @@ namespace OpenSim /// name of avatar to kick private void KickUserCommand(string module, string[] cmdparams) { - if (cmdparams.Length < 4) + bool force = false; + + OptionSet options = new OptionSet().Add("f|force", delegate (string v) { force = v != null; }); + + List mainParams = options.Parse(cmdparams); + + if (mainParams.Count < 4) return; string alert = null; - if (cmdparams.Length > 4) + if (mainParams.Count > 4) alert = String.Format("\n{0}\n", String.Join(" ", cmdparams, 4, cmdparams.Length - 4)); IList agents = SceneManager.GetCurrentSceneAvatars(); @@ -466,8 +476,8 @@ namespace OpenSim { RegionInfo regionInfo = presence.Scene.RegionInfo; - if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && - presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) + if (presence.Firstname.ToLower().Contains(mainParams[2].ToLower()) && + presence.Lastname.ToLower().Contains(mainParams[3].ToLower())) { MainConsole.Instance.Output( String.Format( @@ -480,7 +490,7 @@ namespace OpenSim else presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); - presence.Scene.IncomingCloseAgent(presence.UUID); + presence.Scene.IncomingCloseAgent(presence.UUID, force); } } -- cgit v1.1 From e6fb45859775d0c53de0bcdfc48fad51866d318b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 20 Aug 2012 22:18:29 +0100 Subject: no-op change for cia.vc test --- OpenSim/Region/Application/OpenSim.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 1fc11f5..769eea8 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -420,6 +420,7 @@ namespace OpenSim { RunCommandScript(m_shutdownCommandsFile); } + base.ShutdownSpecific(); } -- cgit v1.1 From d53a53d4c599e77f039149128526ac67570b30fb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 12 Sep 2012 00:10:48 +0100 Subject: Make "show http-handlers" command available for ROBUST instances as well as the simulator executable. --- OpenSim/Region/Application/OpenSim.cs | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') 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 "show circuits", "Show agent circuit data", HandleShow); - m_console.Commands.AddCommand("Comms", false, "show http-handlers", - "show http-handlers", - "Show all registered http handlers", HandleShow); - m_console.Commands.AddCommand("Comms", false, "show pending-objects", "show pending-objects", "Show # of objects on the pending queues of all scene viewers", HandleShow); @@ -1013,33 +1009,6 @@ namespace OpenSim HandleShowCircuits(); break; - case "http-handlers": - System.Text.StringBuilder handlers = new System.Text.StringBuilder("Registered HTTP Handlers:\n"); - - handlers.AppendFormat("* XMLRPC:\n"); - foreach (String s in HttpServer.GetXmlRpcHandlerKeys()) - handlers.AppendFormat("\t{0}\n", s); - - handlers.AppendFormat("* HTTP:\n"); - List poll = HttpServer.GetPollServiceHandlerKeys(); - foreach (String s in HttpServer.GetHTTPHandlerKeys()) - handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty)); - - handlers.AppendFormat("* Agent:\n"); - foreach (String s in HttpServer.GetAgentHandlerKeys()) - handlers.AppendFormat("\t{0}\n", s); - - handlers.AppendFormat("* LLSD:\n"); - foreach (String s in HttpServer.GetLLSDHandlerKeys()) - handlers.AppendFormat("\t{0}\n", s); - - handlers.AppendFormat("* StreamHandlers ({0}):\n", HttpServer.GetStreamHandlerKeys().Count); - foreach (String s in HttpServer.GetStreamHandlerKeys()) - handlers.AppendFormat("\t{0}\n", s); - - MainConsole.Instance.Output(handlers.ToString()); - break; - case "modules": MainConsole.Instance.Output("The currently loaded shared modules are:"); foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) -- cgit v1.1 From ce468215d576cc301a261d85bee9baa68a246ce6 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 24 Jul 2012 19:48:08 +0300 Subject: Support multi-region OAR files Merged ArchiveWriteRequestPreparation.cs and ArchiveWriteRequestExecution.cs. This simplifies the code, and it's faster to write each scene to the archive as it's found rather than all at once at the end. --- OpenSim/Region/Application/OpenSim.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ed339fd..c3c612f 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -292,7 +292,7 @@ namespace OpenSim m_console.Commands.AddCommand("Archiving", false, "save oar", //"save oar [-v|--version=] [-p|--profile=] []", - "save oar [-h|--home=] [--noassets] [--publish] [--perm=] []", + "save oar [-h|--home=] [--noassets] [--publish] [--perm=] [--all] []", "Save a region's data to an OAR archive.", // "-v|--version= generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine "-h|--home= adds the url of the profile service to the saved user information.\n" @@ -302,6 +302,7 @@ namespace OpenSim + " this is useful if you're making oars generally available that might be reloaded to the same grid from which you published\n" + "--perm= stops objects with insufficient permissions from being saved to the OAR.\n" + " can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer\n" + + "--all saves all the regions in the simulator, instead of just the current region.\n" + "The OAR path must be a filesystem path." + " If this is not given then the oar is saved to region.oar in the current directory.", SaveOar); -- cgit v1.1 From b5a3c74a5cbd1634d021923124a997fc4945e5ef Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Oct 2012 02:52:08 +0100 Subject: Add "active true|false" to "debug scene" console command. This allows the scene update and maintenance loops to be started and stopped for debug purposes. --- OpenSim/Region/Application/OpenSim.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index c3c612f..b24641a 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -254,8 +254,14 @@ namespace OpenSim m_console.Commands.AddCommand("Debug", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug); m_console.Commands.AddCommand("Debug", false, "debug scene", - "debug scene ", - "Turn on scene debugging", Debug); + "debug scene active|collisions|physics|scripting|teleport true|false", + "Turn on scene debugging.", + "If active is false then main scene update and maintenance loops are suspended.\n" + + "If collisions is false then collisions with other objects are turned off.\n" + + "If physics is false then all physics objects are non-physical.\n" + + "If scripting is false then no scripting operations happen.\n" + + "If teleport is true then some extra teleport debug information is logged.", + Debug); m_console.Commands.AddCommand("General", false, "change region", "change region ", @@ -930,7 +936,8 @@ namespace OpenSim } else { - MainConsole.Instance.Output("Usage: debug scene scripting|collisions|physics|teleport true|false"); + MainConsole.Instance.Output( + "Usage: debug scene active|scripting|collisions|physics|teleport true|false"); } break; -- cgit v1.1 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