diff options
author | Justin Clarke Casey | 2008-05-07 16:24:15 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-07 16:24:15 +0000 |
commit | 250fb6f5dbcd6665c2783db08389b7e5ce698d5e (patch) | |
tree | ce50e5ed7f0709cd2f819ad3c4eca63338407463 /OpenSim/Framework/Servers/BaseOpenSimServer.cs | |
parent | Thank you very much, Xantor for a patch to improve (diff) | |
download | opensim-SC_OLD-250fb6f5dbcd6665c2783db08389b7e5ce698d5e.zip opensim-SC_OLD-250fb6f5dbcd6665c2783db08389b7e5ce698d5e.tar.gz opensim-SC_OLD-250fb6f5dbcd6665c2783db08389b7e5ce698d5e.tar.bz2 opensim-SC_OLD-250fb6f5dbcd6665c2783db08389b7e5ce698d5e.tar.xz |
* Move shutdown processing to base OpenSimServer, overriding the method where appropriate
* This also means that the command quit (as well as shutdown) will now close down grid servers (instead of only being in place for the region server)
Diffstat (limited to 'OpenSim/Framework/Servers/BaseOpenSimServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index c243042..2069c0e 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -47,7 +47,16 @@ namespace OpenSim.Framework.Servers | |||
47 | public BaseOpenSimServer() | 47 | public BaseOpenSimServer() |
48 | { | 48 | { |
49 | m_startuptime = DateTime.Now; | 49 | m_startuptime = DateTime.Now; |
50 | } | 50 | } |
51 | |||
52 | /// <summary> | ||
53 | /// Should be overriden by descendents if they need to perform extra shutdown processing | ||
54 | /// </summary> | ||
55 | protected virtual void Shutdown() | ||
56 | { | ||
57 | m_console.Close(); | ||
58 | Environment.Exit(0); | ||
59 | } | ||
51 | 60 | ||
52 | /// <summary> | 61 | /// <summary> |
53 | /// Runs commands issued by the server console from the operator | 62 | /// Runs commands issued by the server console from the operator |
@@ -59,7 +68,9 @@ namespace OpenSim.Framework.Servers | |||
59 | switch (command) | 68 | switch (command) |
60 | { | 69 | { |
61 | case "help": | 70 | case "help": |
71 | m_console.Notice("quit - equivalent to shutdown."); | ||
62 | m_console.Notice("show uptime - show server startup and uptime."); | 72 | m_console.Notice("show uptime - show server startup and uptime."); |
73 | m_console.Notice("shutdown - shutdown the server.\n"); | ||
63 | break; | 74 | break; |
64 | 75 | ||
65 | case "show": | 76 | case "show": |
@@ -68,6 +79,11 @@ namespace OpenSim.Framework.Servers | |||
68 | Show(cmdparams[0]); | 79 | Show(cmdparams[0]); |
69 | } | 80 | } |
70 | break; | 81 | break; |
82 | |||
83 | case "quit": | ||
84 | case "shutdown": | ||
85 | Shutdown(); | ||
86 | break; | ||
71 | } | 87 | } |
72 | } | 88 | } |
73 | 89 | ||