diff options
author | Diva Canto | 2010-11-25 16:27:19 -0800 |
---|---|---|
committer | Diva Canto | 2010-11-25 16:27:19 -0800 |
commit | 1cbd2842d56dc4ee4dc26ecfbea45768a4aa8887 (patch) | |
tree | a077780dbb79749adca9f4b7c5da121b0ab42db2 /OpenSim/ApplicationPlugins | |
parent | WARNING: LOTS OF CONFIGURATION CHANGES AFFECTING PRIMARILY HG CONFIGS. Added ... (diff) | |
parent | Export the module interface for restart (diff) | |
download | opensim-SC_OLD-1cbd2842d56dc4ee4dc26ecfbea45768a4aa8887.zip opensim-SC_OLD-1cbd2842d56dc4ee4dc26ecfbea45768a4aa8887.tar.gz opensim-SC_OLD-1cbd2842d56dc4ee4dc26ecfbea45768a4aa8887.tar.bz2 opensim-SC_OLD-1cbd2842d56dc4ee4dc26ecfbea45768a4aa8887.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index c09252a..1b4d1ea 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -208,18 +208,25 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
208 | 208 | ||
209 | UUID regionID = new UUID((string) requestData["regionID"]); | 209 | UUID regionID = new UUID((string) requestData["regionID"]); |
210 | 210 | ||
211 | responseData["accepted"] = true; | ||
212 | responseData["success"] = true; | ||
213 | response.Value = responseData; | ||
214 | |||
215 | Scene rebootedScene; | 211 | Scene rebootedScene; |
216 | 212 | ||
213 | responseData["success"] = false; | ||
214 | responseData["accepted"] = true; | ||
217 | if (!m_application.SceneManager.TryGetScene(regionID, out rebootedScene)) | 215 | if (!m_application.SceneManager.TryGetScene(regionID, out rebootedScene)) |
218 | throw new Exception("region not found"); | 216 | throw new Exception("region not found"); |
219 | 217 | ||
220 | responseData["rebooting"] = true; | 218 | responseData["rebooting"] = true; |
219 | |||
220 | IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>(); | ||
221 | if (restartModule != null) | ||
222 | { | ||
223 | List<int> times = new List<int> { 30, 15 }; | ||
224 | |||
225 | restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); | ||
226 | responseData["success"] = true; | ||
227 | } | ||
221 | response.Value = responseData; | 228 | response.Value = responseData; |
222 | rebootedScene.Restart(30); | 229 | |
223 | } | 230 | } |
224 | catch (Exception e) | 231 | catch (Exception e) |
225 | { | 232 | { |