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/Grid | |
parent | Thank you very much, Xantor for a patch to improve (diff) | |
download | opensim-SC-250fb6f5dbcd6665c2783db08389b7e5ce698d5e.zip opensim-SC-250fb6f5dbcd6665c2783db08389b7e5ce698d5e.tar.gz opensim-SC-250fb6f5dbcd6665c2783db08389b7e5ce698d5e.tar.bz2 opensim-SC-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 '')
-rw-r--r-- | OpenSim/Grid/AssetServer/Main.cs | 4 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer/GridServerBase.cs | 21 | ||||
-rw-r--r-- | OpenSim/Grid/InventoryServer/Main.cs | 4 | ||||
-rw-r--r-- | OpenSim/Grid/MessagingServer/Main.cs | 24 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServerMain.cs | 4 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 16 |
6 files changed, 18 insertions, 55 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 26f4bc8..77e4628 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs | |||
@@ -181,9 +181,7 @@ namespace OpenSim.Grid.AssetServer | |||
181 | switch (cmd) | 181 | switch (cmd) |
182 | { | 182 | { |
183 | case "help": | 183 | case "help": |
184 | m_console.Notice( | 184 | m_console.Notice("stats - statistical information for this server"); |
185 | @"shutdown - shutdown this asset server (USE CAUTION!) | ||
186 | stats - statistical information for this server"); | ||
187 | 185 | ||
188 | break; | 186 | break; |
189 | 187 | ||
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index 2feaac3..49c53e9 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs | |||
@@ -177,23 +177,12 @@ namespace OpenSim.Grid.GridServer | |||
177 | } | 177 | } |
178 | */ | 178 | */ |
179 | } | 179 | } |
180 | 180 | ||
181 | public override void RunCmd(string cmd, string[] cmdparams) | 181 | protected override void Shutdown() |
182 | { | 182 | { |
183 | base.RunCmd(cmd, cmdparams); | 183 | foreach (IGridPlugin plugin in m_plugins) plugin.Close(); |
184 | 184 | ||
185 | switch (cmd) | 185 | base.Shutdown(); |
186 | { | ||
187 | case "help": | ||
188 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); | ||
189 | break; | ||
190 | |||
191 | case "shutdown": | ||
192 | foreach (IGridPlugin plugin in m_plugins) plugin.Close(); | ||
193 | m_console.Close(); | ||
194 | Environment.Exit(0); | ||
195 | break; | ||
196 | } | ||
197 | } | 186 | } |
198 | } | 187 | } |
199 | } | 188 | } |
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs index 4076d21..f1bd60f 100644 --- a/OpenSim/Grid/InventoryServer/Main.cs +++ b/OpenSim/Grid/InventoryServer/Main.cs | |||
@@ -144,10 +144,6 @@ namespace OpenSim.Grid.InventoryServer | |||
144 | case "add-user": | 144 | case "add-user": |
145 | m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); | 145 | m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); |
146 | break; | 146 | break; |
147 | case "shutdown": | ||
148 | m_console.Close(); | ||
149 | Environment.Exit(0); | ||
150 | break; | ||
151 | } | 147 | } |
152 | } | 148 | } |
153 | } | 149 | } |
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index bf793bf..22a7d9c 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs | |||
@@ -140,29 +140,13 @@ namespace OpenSim.Grid.MessagingServer | |||
140 | // m_lastCreatedUser = userID; | 140 | // m_lastCreatedUser = userID; |
141 | break; | 141 | break; |
142 | } | 142 | } |
143 | } | 143 | } |
144 | 144 | ||
145 | public override void RunCmd(string cmd, string[] cmdparams) | 145 | protected override void Shutdown() |
146 | { | 146 | { |
147 | base.RunCmd(cmd, cmdparams); | 147 | msgsvc.deregisterWithUserServer(); |
148 | 148 | ||
149 | switch (cmd) | 149 | base.Shutdown(); |
150 | { | ||
151 | case "help": | ||
152 | m_console.Notice("shutdown - shutdown the message server (USE CAUTION!)"); | ||
153 | break; | ||
154 | |||
155 | case "shutdown": | ||
156 | msgsvc.deregisterWithUserServer(); | ||
157 | m_console.Close(); | ||
158 | Environment.Exit(0); | ||
159 | break; | ||
160 | } | ||
161 | } | ||
162 | |||
163 | public override void Show(string ShowWhat) | ||
164 | { | ||
165 | base.Show(ShowWhat); | ||
166 | } | 150 | } |
167 | } | 151 | } |
168 | } | 152 | } |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs index 528b51c..e487c02 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs | |||
@@ -97,10 +97,6 @@ namespace OpenSim.Grid.ScriptServer | |||
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
100 | ~ScriptServerMain() | ||
101 | { | ||
102 | } | ||
103 | |||
104 | protected ConsoleBase CreateConsole() | 100 | protected ConsoleBase CreateConsole() |
105 | { | 101 | { |
106 | return new ConsoleBase("ScriptServer", this); | 102 | return new ConsoleBase("ScriptServer", this); |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 8e6559c..d60c205 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -219,19 +219,12 @@ namespace OpenSim.Grid.UserServer | |||
219 | { | 219 | { |
220 | case "help": | 220 | case "help": |
221 | m_console.Notice("create user - create a new user"); | 221 | m_console.Notice("create user - create a new user"); |
222 | m_console.Notice("stats - statistical information for this server"); | 222 | m_console.Notice("stats - statistical information for this server"); |
223 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); | ||
224 | break; | 223 | break; |
225 | 224 | ||
226 | case "create": | 225 | case "create": |
227 | do_create(cmdparams[0]); | 226 | do_create(cmdparams[0]); |
228 | break; | 227 | break; |
229 | |||
230 | case "shutdown": | ||
231 | m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; | ||
232 | m_console.Close(); | ||
233 | Environment.Exit(0); | ||
234 | break; | ||
235 | 228 | ||
236 | case "stats": | 229 | case "stats": |
237 | m_console.Notice(StatsManager.UserStats.Report()); | 230 | m_console.Notice(StatsManager.UserStats.Report()); |
@@ -251,6 +244,13 @@ namespace OpenSim.Grid.UserServer | |||
251 | } | 244 | } |
252 | } | 245 | } |
253 | 246 | ||
247 | protected override void Shutdown() | ||
248 | { | ||
249 | m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; | ||
250 | |||
251 | base.Shutdown(); | ||
252 | } | ||
253 | |||
254 | public void TestResponse(List<InventoryFolderBase> resp) | 254 | public void TestResponse(List<InventoryFolderBase> resp) |
255 | { | 255 | { |
256 | m_console.Notice("response got"); | 256 | m_console.Notice("response got"); |