From 8c8c8a00a47b61fcfd4a500ac8f13aa1aafaad26 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 Nov 2012 02:22:30 +0000 Subject: Fix problem where restarting the currently selected region would stop various console commands (e.g. "show users") from working. This was because the "currently selected" scene reference was being left as the dead scene instead of the restarted Scene object. --- OpenSim/Region/Application/OpenSimBase.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Application/OpenSimBase.cs') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index b40aa4b..c3c87e7 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -299,7 +299,7 @@ namespace OpenSim // Called from base.StartUp() m_httpServerPort = m_networkServersInfo.HttpListenerPort; - SceneManager.OnRestartSim += handleRestartRegion; + SceneManager.OnRestartSim += HandleRestartRegion; // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is // heavily used during initial startup. @@ -735,9 +735,11 @@ namespace OpenSim } } - public void handleRestartRegion(RegionInfo whichRegion) + protected virtual void HandleRestartRegion(RegionInfo whichRegion) { - m_log.Info("[OPENSIM]: Got restart signal from SceneManager"); + m_log.InfoFormat( + "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})", + whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY); ShutdownClientServer(whichRegion); IScene scene; @@ -883,7 +885,6 @@ namespace OpenSim m_log.Info("[SHUTDOWN]: Closing all threads"); m_log.Info("[SHUTDOWN]: Killing listener thread"); m_log.Info("[SHUTDOWN]: Killing clients"); - // TODO: implement this m_log.Info("[SHUTDOWN]: Closing console and terminating"); try @@ -892,7 +893,7 @@ namespace OpenSim } catch (Exception e) { - m_log.ErrorFormat("[SHUTDOWN]: Ignoring failure during shutdown - {0}", e); + m_log.Error("[SHUTDOWN]: Ignoring failure during shutdown - ", e); } } -- cgit v1.1