diff options
author | Melanie | 2012-11-23 03:39:49 +0000 |
---|---|---|
committer | Melanie | 2012-11-23 03:39:49 +0000 |
commit | ae8733bf5943e42f019007ebad951360747d4fc1 (patch) | |
tree | 09b9cb539fc7a3a05067f47628adac7331e8cf28 /OpenSim/Region/Application | |
parent | Add a newline before the constant help text (diff) | |
parent | Remove the redundant BypassPermissions() checks in EstateManagmentModule. (diff) | |
download | opensim-SC-ae8733bf5943e42f019007ebad951360747d4fc1.zip opensim-SC-ae8733bf5943e42f019007ebad951360747d4fc1.tar.gz opensim-SC-ae8733bf5943e42f019007ebad951360747d4fc1.tar.bz2 opensim-SC-ae8733bf5943e42f019007ebad951360747d4fc1.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
OpenSim/Region/Framework/Scenes/SceneManager.cs
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 11 |
2 files changed, 26 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 7cafc5d..08e4023 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -664,12 +664,20 @@ namespace OpenSim | |||
664 | 664 | ||
665 | if (!SceneManager.TrySetCurrentScene(newRegionName)) | 665 | if (!SceneManager.TrySetCurrentScene(newRegionName)) |
666 | MainConsole.Instance.Output(String.Format("Couldn't select region {0}", newRegionName)); | 666 | MainConsole.Instance.Output(String.Format("Couldn't select region {0}", newRegionName)); |
667 | else | ||
668 | RefreshPrompt(); | ||
667 | } | 669 | } |
668 | else | 670 | else |
669 | { | 671 | { |
670 | MainConsole.Instance.Output("Usage: change region <region name>"); | 672 | MainConsole.Instance.Output("Usage: change region <region name>"); |
671 | } | 673 | } |
674 | } | ||
672 | 675 | ||
676 | /// <summary> | ||
677 | /// Refreshs prompt with the current selection details. | ||
678 | /// </summary> | ||
679 | private void RefreshPrompt() | ||
680 | { | ||
673 | string regionName = (SceneManager.CurrentScene == null ? "root" : SceneManager.CurrentScene.RegionInfo.RegionName); | 681 | string regionName = (SceneManager.CurrentScene == null ? "root" : SceneManager.CurrentScene.RegionInfo.RegionName); |
674 | MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName)); | 682 | MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName)); |
675 | 683 | ||
@@ -691,6 +699,18 @@ namespace OpenSim | |||
691 | m_console.ConsoleScene = SceneManager.CurrentScene; | 699 | m_console.ConsoleScene = SceneManager.CurrentScene; |
692 | } | 700 | } |
693 | 701 | ||
702 | protected override void HandleRestartRegion(RegionInfo whichRegion) | ||
703 | { | ||
704 | base.HandleRestartRegion(whichRegion); | ||
705 | |||
706 | // Where we are restarting multiple scenes at once, a previous call to RefreshPrompt may have set the | ||
707 | // m_console.ConsoleScene to null (indicating all scenes). | ||
708 | if (m_console.ConsoleScene != null && whichRegion.RegionName == ((Scene)m_console.ConsoleScene).Name) | ||
709 | SceneManager.TrySetCurrentScene(whichRegion.RegionName); | ||
710 | |||
711 | RefreshPrompt(); | ||
712 | } | ||
713 | |||
694 | /// <summary> | 714 | /// <summary> |
695 | /// Turn on some debugging values for OpenSim. | 715 | /// Turn on some debugging values for OpenSim. |
696 | /// </summary> | 716 | /// </summary> |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index eb4326e..17db0a1 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -314,7 +314,7 @@ namespace OpenSim | |||
314 | // Called from base.StartUp() | 314 | // Called from base.StartUp() |
315 | 315 | ||
316 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | 316 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; |
317 | SceneManager.OnRestartSim += handleRestartRegion; | 317 | SceneManager.OnRestartSim += HandleRestartRegion; |
318 | 318 | ||
319 | // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is | 319 | // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is |
320 | // heavily used during initial startup. | 320 | // heavily used during initial startup. |
@@ -819,9 +819,11 @@ namespace OpenSim | |||
819 | } | 819 | } |
820 | } | 820 | } |
821 | 821 | ||
822 | public void handleRestartRegion(RegionInfo whichRegion) | 822 | protected virtual void HandleRestartRegion(RegionInfo whichRegion) |
823 | { | 823 | { |
824 | m_log.Info("[OPENSIM]: Got restart signal from SceneManager"); | 824 | m_log.InfoFormat( |
825 | "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})", | ||
826 | whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY); | ||
825 | 827 | ||
826 | ShutdownClientServer(whichRegion); | 828 | ShutdownClientServer(whichRegion); |
827 | IScene scene; | 829 | IScene scene; |
@@ -967,7 +969,6 @@ namespace OpenSim | |||
967 | m_log.Info("[SHUTDOWN]: Closing all threads"); | 969 | m_log.Info("[SHUTDOWN]: Closing all threads"); |
968 | m_log.Info("[SHUTDOWN]: Killing listener thread"); | 970 | m_log.Info("[SHUTDOWN]: Killing listener thread"); |
969 | m_log.Info("[SHUTDOWN]: Killing clients"); | 971 | m_log.Info("[SHUTDOWN]: Killing clients"); |
970 | // TODO: implement this | ||
971 | m_log.Info("[SHUTDOWN]: Closing console and terminating"); | 972 | m_log.Info("[SHUTDOWN]: Closing console and terminating"); |
972 | 973 | ||
973 | try | 974 | try |
@@ -976,7 +977,7 @@ namespace OpenSim | |||
976 | } | 977 | } |
977 | catch (Exception e) | 978 | catch (Exception e) |
978 | { | 979 | { |
979 | m_log.ErrorFormat("[SHUTDOWN]: Ignoring failure during shutdown - {0}", e); | 980 | m_log.Error("[SHUTDOWN]: Ignoring failure during shutdown - ", e); |
980 | } | 981 | } |
981 | } | 982 | } |
982 | 983 | ||