diff options
author | Oren Hurvitz | 2015-07-17 16:46:19 +0300 |
---|---|---|
committer | Oren Hurvitz | 2015-08-11 07:35:37 +0100 |
commit | c8135834db90dc438543a3906fffe1024f4c9a03 (patch) | |
tree | 84958cc072fadf6172ec4e14d62cf5fbe912fee5 | |
parent | Better handling of invalid XML: a) prevent infinite loop on EOF; b) better lo... (diff) | |
download | opensim-SC-c8135834db90dc438543a3906fffe1024f4c9a03.zip opensim-SC-c8135834db90dc438543a3906fffe1024f4c9a03.tar.gz opensim-SC-c8135834db90dc438543a3906fffe1024f4c9a03.tar.bz2 opensim-SC-c8135834db90dc438543a3906fffe1024f4c9a03.tar.xz |
Prevent a crash if "debug jobengine log" is entered without a log level
-rw-r--r-- | OpenSim/Framework/Monitoring/WorkManager.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Framework/Monitoring/WorkManager.cs b/OpenSim/Framework/Monitoring/WorkManager.cs index 134661b..d1a74ce 100644 --- a/OpenSim/Framework/Monitoring/WorkManager.cs +++ b/OpenSim/Framework/Monitoring/WorkManager.cs | |||
@@ -267,6 +267,12 @@ namespace OpenSim.Framework.Monitoring | |||
267 | } | 267 | } |
268 | else if (subCommand == "log") | 268 | else if (subCommand == "log") |
269 | { | 269 | { |
270 | if (args.Length < 4) | ||
271 | { | ||
272 | MainConsole.Instance.Output("Usage: debug jobengine log <level>"); | ||
273 | return; | ||
274 | } | ||
275 | |||
270 | // int logLevel; | 276 | // int logLevel; |
271 | int logLevel = int.Parse(args[3]); | 277 | int logLevel = int.Parse(args[3]); |
272 | // if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel)) | 278 | // if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel)) |