When regions are set to shut down the instance, always send notifications to
all affected regions and disregard the region id parameter.avinationmerge
parent
928e3e9e21
commit
207a5f17b5
|
@ -258,10 +258,25 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Request to restart Region.");
|
m_log.Info("[RADMIN]: Request to restart Region.");
|
||||||
|
|
||||||
|
Scene rebootedScene = null;
|
||||||
|
bool restartAll = false;
|
||||||
|
|
||||||
|
IConfig startupConfig = m_configSource.Configs["Startup"];
|
||||||
|
if (startupConfig != null)
|
||||||
|
{
|
||||||
|
if (startupConfig.GetBoolean("InworldRestartShutsDown", false))
|
||||||
|
{
|
||||||
|
rebootedScene = m_application.SceneManager.CurrentOrFirstScene;
|
||||||
|
restartAll = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rebootedScene == null)
|
||||||
|
{
|
||||||
CheckRegionParams(requestData, responseData);
|
CheckRegionParams(requestData, responseData);
|
||||||
|
|
||||||
Scene rebootedScene = null;
|
|
||||||
GetSceneFromRegionParams(requestData, responseData, out rebootedScene);
|
GetSceneFromRegionParams(requestData, responseData, out rebootedScene);
|
||||||
|
}
|
||||||
|
|
||||||
IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>();
|
IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>();
|
||||||
|
|
||||||
|
@ -324,11 +339,20 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
notice = false;
|
notice = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restartModule != null)
|
List<Scene> restartList;
|
||||||
|
|
||||||
|
if (restartAll)
|
||||||
|
restartList = m_application.SceneManager.Scenes;
|
||||||
|
else
|
||||||
|
restartList = new List<Scene>() { rebootedScene };
|
||||||
|
|
||||||
|
foreach (Scene s in m_application.SceneManager.Scenes)
|
||||||
{
|
{
|
||||||
|
restartModule = s.RequestModuleInterface<IRestartModule>();
|
||||||
|
if (restartModule != null)
|
||||||
restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice);
|
restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice);
|
||||||
responseData["success"] = true;
|
|
||||||
}
|
}
|
||||||
|
responseData["success"] = true;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue