From bd2ca2d9c1a8ea958255f1f8e9b31c46754cce26 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Thu, 16 Apr 2009 12:10:50 +0000 Subject: [PATCH] - turn private m_gui into protected m_gui to allow manipulation in derived classes - make OpenSimBackground inherit from OpenSim instead of OpenSimBase so that it will have a MainConsole instance and we can use console commands, setting m_gui to false --- OpenSim/Region/Application/OpenSim.cs | 2 +- OpenSim/Region/Application/OpenSimBackground.cs | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 8ebf144c2a..bafa736f58 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -51,10 +51,10 @@ namespace OpenSim protected string m_startupCommandsFile; protected string m_shutdownCommandsFile; + protected bool m_gui = false; private string m_timedScript = "disabled"; private Timer m_scriptTimer; - private bool m_gui = false; public OpenSim(IConfigSource configSource) : base(configSource) { diff --git a/OpenSim/Region/Application/OpenSimBackground.cs b/OpenSim/Region/Application/OpenSimBackground.cs index 93999cec08..16c244abf5 100644 --- a/OpenSim/Region/Application/OpenSimBackground.cs +++ b/OpenSim/Region/Application/OpenSimBackground.cs @@ -35,7 +35,7 @@ namespace OpenSim /// /// Consoleless OpenSim region server /// - public class OpenSimBackground : OpenSimBase + public class OpenSimBackground : OpenSim { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -50,18 +50,10 @@ namespace OpenSim /// public override void Startup() { - // - // Called from app startup (OpenSim.Application) - // - m_log.Info("===================================================================="); - m_log.Info("========================= STARTING OPENSIM ========================="); - m_log.Info("===================================================================="); - m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", - ConfigurationSettings.Standalone ? "sandbox" : "grid"); + m_gui = false; base.Startup(); - // We are done with startup m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : ""); @@ -74,7 +66,6 @@ namespace OpenSim public override void Shutdown() { WorldHasComeToAnEnd.Set(); - base.Shutdown(); } }