diff options
author | Melanie | 2012-06-03 13:43:39 +0200 |
---|---|---|
committer | Melanie | 2012-06-03 13:43:39 +0200 |
commit | 207a5f17b58d58be249387c2195554d58f72a525 (patch) | |
tree | 9254daad4ef86a2e7cf15ca70195dfb0ea2bd987 /OpenSim/ApplicationPlugins/RemoteController | |
parent | Fix LSL animation state reporting and animation state transitions on crossing (diff) | |
download | opensim-SC_OLD-207a5f17b58d58be249387c2195554d58f72a525.zip opensim-SC_OLD-207a5f17b58d58be249387c2195554d58f72a525.tar.gz opensim-SC_OLD-207a5f17b58d58be249387c2195554d58f72a525.tar.bz2 opensim-SC_OLD-207a5f17b58d58be249387c2195554d58f72a525.tar.xz |
When regions are set to shut down the instance, always send notifications to
all affected regions and disregard the region id parameter.
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 9e72a98..437d150 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -258,10 +258,25 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
258 | { | 258 | { |
259 | m_log.Info("[RADMIN]: Request to restart Region."); | 259 | m_log.Info("[RADMIN]: Request to restart Region."); |
260 | 260 | ||
261 | CheckRegionParams(requestData, responseData); | ||
262 | |||
263 | Scene rebootedScene = null; | 261 | Scene rebootedScene = null; |
264 | GetSceneFromRegionParams(requestData, responseData, out rebootedScene); | 262 | bool restartAll = false; |
263 | |||
264 | IConfig startupConfig = m_configSource.Configs["Startup"]; | ||
265 | if (startupConfig != null) | ||
266 | { | ||
267 | if (startupConfig.GetBoolean("InworldRestartShutsDown", false)) | ||
268 | { | ||
269 | rebootedScene = m_application.SceneManager.CurrentOrFirstScene; | ||
270 | restartAll = true; | ||
271 | } | ||
272 | } | ||
273 | |||
274 | if (rebootedScene == null) | ||
275 | { | ||
276 | CheckRegionParams(requestData, responseData); | ||
277 | |||
278 | GetSceneFromRegionParams(requestData, responseData, out rebootedScene); | ||
279 | } | ||
265 | 280 | ||
266 | IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>(); | 281 | IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>(); |
267 | 282 | ||
@@ -324,11 +339,20 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
324 | notice = false; | 339 | notice = false; |
325 | } | 340 | } |
326 | 341 | ||
327 | if (restartModule != null) | 342 | List<Scene> restartList; |
343 | |||
344 | if (restartAll) | ||
345 | restartList = m_application.SceneManager.Scenes; | ||
346 | else | ||
347 | restartList = new List<Scene>() { rebootedScene }; | ||
348 | |||
349 | foreach (Scene s in m_application.SceneManager.Scenes) | ||
328 | { | 350 | { |
329 | restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice); | 351 | restartModule = s.RequestModuleInterface<IRestartModule>(); |
330 | responseData["success"] = true; | 352 | if (restartModule != null) |
353 | restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice); | ||
331 | } | 354 | } |
355 | responseData["success"] = true; | ||
332 | } | 356 | } |
333 | catch (Exception e) | 357 | catch (Exception e) |
334 | { | 358 | { |