aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseOpenSimServer.cs
diff options
context:
space:
mode:
authorMelanie2011-10-26 01:27:24 +0100
committerMelanie2011-10-26 01:27:24 +0100
commitfd22159d0c7d7b149d35747cbaa436f3b1e6f579 (patch)
treebbe8cdc63dd1f98346a6afb844f4b4d3caf336a8 /OpenSim/Framework/Servers/BaseOpenSimServer.cs
parentMerge commit 'e14cb45b9bc4c78300cb804833cb66c1c2e62187' into bigmerge (diff)
parentRestart the event queue worker threads that I accidentally disabled earlier t... (diff)
downloadopensim-SC-fd22159d0c7d7b149d35747cbaa436f3b1e6f579.zip
opensim-SC-fd22159d0c7d7b149d35747cbaa436f3b1e6f579.tar.gz
opensim-SC-fd22159d0c7d7b149d35747cbaa436f3b1e6f579.tar.bz2
opensim-SC-fd22159d0c7d7b149d35747cbaa436f3b1e6f579.tar.xz
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Framework/Watchdog.cs
Diffstat (limited to 'OpenSim/Framework/Servers/BaseOpenSimServer.cs')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs30
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 {