diff options
author | Melanie | 2011-10-26 17:55:53 +0200 |
---|---|---|
committer | Melanie | 2011-10-26 17:55:53 +0200 |
commit | c763419043773c93dbbc865ec35f7ecf856a641a (patch) | |
tree | ac9f99c33ae788e6b7fdfd0843c2ae584a896dc6 /OpenSim/Framework/Servers/BaseOpenSimServer.cs | |
parent | Fix a missing locking call (diff) | |
parent | Merge branch 'master' into bigmerge (diff) | |
download | opensim-SC-c763419043773c93dbbc865ec35f7ecf856a641a.zip opensim-SC-c763419043773c93dbbc865ec35f7ecf856a641a.tar.gz opensim-SC-c763419043773c93dbbc865ec35f7ecf856a641a.tar.bz2 opensim-SC-c763419043773c93dbbc865ec35f7ecf856a641a.tar.xz |
Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 64b9c3e..66d0813 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -192,6 +192,15 @@ namespace OpenSim.Framework.Servers | |||
192 | m_console.Commands.AddCommand("base", false, "show version", | 192 | m_console.Commands.AddCommand("base", false, "show version", |
193 | "show version", | 193 | "show version", |
194 | "Show server version", HandleShow); | 194 | "Show server version", HandleShow); |
195 | |||
196 | m_console.Commands.AddCommand("base", false, "threads abort", | ||
197 | "threads abort <thread-id>", | ||
198 | "Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort); | ||
199 | |||
200 | m_console.Commands.AddCommand("base", false, "threads show", | ||
201 | "threads show", | ||
202 | "Show thread status. Synonym for \"show threads\"", | ||
203 | (string module, string[] args) => Notice(GetThreadsReport())); | ||
195 | } | 204 | } |
196 | } | 205 | } |
197 | 206 | ||
@@ -395,6 +404,27 @@ namespace OpenSim.Framework.Servers | |||
395 | break; | 404 | break; |
396 | } | 405 | } |
397 | } | 406 | } |
407 | |||
408 | public virtual void HandleThreadsAbort(string module, string[] cmd) | ||
409 | { | ||
410 | if (cmd.Length != 3) | ||
411 | { | ||
412 | MainConsole.Instance.Output("Usage: threads abort <thread-id>"); | ||
413 | return; | ||
414 | } | ||
415 | |||
416 | int threadId; | ||
417 | if (!int.TryParse(cmd[2], out threadId)) | ||
418 | { | ||
419 | MainConsole.Instance.Output("ERROR: Thread id must be an integer"); | ||
420 | return; | ||
421 | } | ||
422 | |||
423 | if (Watchdog.AbortThread(threadId)) | ||
424 | MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId); | ||
425 | else | ||
426 | MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId); | ||
427 | } | ||
398 | 428 | ||
399 | protected void ShowInfo() | 429 | protected void ShowInfo() |
400 | { | 430 | { |