diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 62 |
1 files changed, 7 insertions, 55 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index a7e7d03..6dd1f5b 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -86,6 +86,7 @@ namespace OpenSim | |||
86 | IConfig startupConfig = Config.Configs["Startup"]; | 86 | IConfig startupConfig = Config.Configs["Startup"]; |
87 | IConfig networkConfig = Config.Configs["Network"]; | 87 | IConfig networkConfig = Config.Configs["Network"]; |
88 | 88 | ||
89 | int stpMinThreads = 2; | ||
89 | int stpMaxThreads = 15; | 90 | int stpMaxThreads = 15; |
90 | 91 | ||
91 | if (startupConfig != null) | 92 | if (startupConfig != null) |
@@ -112,12 +113,13 @@ namespace OpenSim | |||
112 | if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod)) | 113 | if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod)) |
113 | Util.FireAndForgetMethod = asyncCallMethod; | 114 | Util.FireAndForgetMethod = asyncCallMethod; |
114 | 115 | ||
116 | stpMinThreads = startupConfig.GetInt("MinPoolThreads", 15); | ||
115 | stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); | 117 | stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); |
116 | m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); | 118 | m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); |
117 | } | 119 | } |
118 | 120 | ||
119 | if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) | 121 | if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) |
120 | Util.InitThreadPool(stpMaxThreads); | 122 | Util.InitThreadPool(stpMinThreads, stpMaxThreads); |
121 | 123 | ||
122 | m_log.Info("[OPENSIM MAIN]: Using async_call_method " + Util.FireAndForgetMethod); | 124 | m_log.Info("[OPENSIM MAIN]: Using async_call_method " + Util.FireAndForgetMethod); |
123 | } | 125 | } |
@@ -226,18 +228,6 @@ namespace OpenSim | |||
226 | "Force the update of all objects on clients", | 228 | "Force the update of all objects on clients", |
227 | HandleForceUpdate); | 229 | HandleForceUpdate); |
228 | 230 | ||
229 | m_console.Commands.AddCommand("Debug", false, "debug packet", | ||
230 | "debug packet <level> [<avatar-first-name> <avatar-last-name>]", | ||
231 | "Turn on packet debugging", | ||
232 | "If level > 255 then all incoming and outgoing packets are logged.\n" | ||
233 | + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" | ||
234 | + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" | ||
235 | + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" | ||
236 | + "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n" | ||
237 | + "If level <= 0 then no packets are logged.\n" | ||
238 | + "If an avatar name is given then only packets from that avatar are logged", | ||
239 | Debug); | ||
240 | |||
241 | m_console.Commands.AddCommand("General", false, "change region", | 231 | m_console.Commands.AddCommand("General", false, "change region", |
242 | "change region <region name>", | 232 | "change region <region name>", |
243 | "Change current console region", ChangeSelectedRegion); | 233 | "Change current console region", ChangeSelectedRegion); |
@@ -372,7 +362,7 @@ namespace OpenSim | |||
372 | "Unload a module", HandleModules); | 362 | "Unload a module", HandleModules); |
373 | } | 363 | } |
374 | 364 | ||
375 | public override void ShutdownSpecific() | 365 | protected override void ShutdownSpecific() |
376 | { | 366 | { |
377 | if (m_shutdownCommandsFile != String.Empty) | 367 | if (m_shutdownCommandsFile != String.Empty) |
378 | { | 368 | { |
@@ -435,8 +425,8 @@ namespace OpenSim | |||
435 | { | 425 | { |
436 | RegionInfo regionInfo = presence.Scene.RegionInfo; | 426 | RegionInfo regionInfo = presence.Scene.RegionInfo; |
437 | 427 | ||
438 | if (presence.Firstname.ToLower().Contains(mainParams[2].ToLower()) && | 428 | if (presence.Firstname.ToLower().Equals(mainParams[2].ToLower()) && |
439 | presence.Lastname.ToLower().Contains(mainParams[3].ToLower())) | 429 | presence.Lastname.ToLower().Equals(mainParams[3].ToLower())) |
440 | { | 430 | { |
441 | MainConsole.Instance.Output( | 431 | MainConsole.Instance.Output( |
442 | String.Format( | 432 | String.Format( |
@@ -450,6 +440,7 @@ namespace OpenSim | |||
450 | presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); | 440 | presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); |
451 | 441 | ||
452 | presence.Scene.IncomingCloseAgent(presence.UUID, force); | 442 | presence.Scene.IncomingCloseAgent(presence.UUID, force); |
443 | break; | ||
453 | } | 444 | } |
454 | } | 445 | } |
455 | 446 | ||
@@ -701,45 +692,6 @@ namespace OpenSim | |||
701 | RefreshPrompt(); | 692 | RefreshPrompt(); |
702 | } | 693 | } |
703 | 694 | ||
704 | /// <summary> | ||
705 | /// Turn on some debugging values for OpenSim. | ||
706 | /// </summary> | ||
707 | /// <param name="args"></param> | ||
708 | protected void Debug(string module, string[] args) | ||
709 | { | ||
710 | if (args.Length == 1) | ||
711 | return; | ||
712 | |||
713 | switch (args[1]) | ||
714 | { | ||
715 | case "packet": | ||
716 | string name = null; | ||
717 | if (args.Length == 5) | ||
718 | name = string.Format("{0} {1}", args[3], args[4]); | ||
719 | |||
720 | if (args.Length > 2) | ||
721 | { | ||
722 | int newDebug; | ||
723 | if (int.TryParse(args[2], out newDebug)) | ||
724 | { | ||
725 | SceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name); | ||
726 | // We provide user information elsewhere if any clients had their debug level set. | ||
727 | // MainConsole.Instance.OutputFormat("Debug packet level set to {0}", newDebug); | ||
728 | } | ||
729 | else | ||
730 | { | ||
731 | MainConsole.Instance.Output("Usage: debug packet 0..255"); | ||
732 | } | ||
733 | } | ||
734 | |||
735 | break; | ||
736 | |||
737 | default: | ||
738 | MainConsole.Instance.Output("Unknown debug command"); | ||
739 | break; | ||
740 | } | ||
741 | } | ||
742 | |||
743 | // see BaseOpenSimServer | 695 | // see BaseOpenSimServer |
744 | /// <summary> | 696 | /// <summary> |
745 | /// Many commands list objects for debugging. Some of the types are listed here | 697 | /// Many commands list objects for debugging. Some of the types are listed here |