From 204ef95843908a3c5e27ae42b5ffcb0a235a9552 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 5 Nov 2008 18:00:45 +0000 Subject: [PATCH] Moved a couple of more configuration fields to ConfigSettings --- OpenSim/Framework/ConfigSettings.cs | 16 ++++++++++++++++ OpenSim/Region/Application/OpenSimBase.cs | 15 ++++++++++----- .../Region/ClientStack/RegionApplicationBase.cs | 8 +++----- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/OpenSim/Framework/ConfigSettings.cs b/OpenSim/Framework/ConfigSettings.cs index 7efc778fdd..275ab699f6 100644 --- a/OpenSim/Framework/ConfigSettings.cs +++ b/OpenSim/Framework/ConfigSettings.cs @@ -132,5 +132,21 @@ namespace OpenSim.Framework get { return m_assetStorage; } set { m_assetStorage = value; } } + + protected string m_storageConnectionString; + + public string StorageConnectionString + { + get { return m_storageConnectionString; } + set { m_storageConnectionString = value; } + } + + protected string m_estateConnectionString; + + public string EstateConnectionString + { + get { return m_estateConnectionString; } + set { m_estateConnectionString = value; } + } } } diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index a3b557d6ae..61e6f09121 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -286,9 +286,9 @@ namespace OpenSim Console.WriteLine("WARNING: OpenSim.DataStore.MonoSqlite.dll is deprecated. Set storage_plugin to OpenSim.Data.SQLite.dll."); Thread.Sleep(3000); } - - m_storageConnectionString = startupConfig.GetString("storage_connection_string"); - m_estateConnectionString = startupConfig.GetString("estate_connection_string", m_storageConnectionString); + + m_configSettings.StorageConnectionString = startupConfig.GetString("storage_connection_string"); + m_configSettings.EstateConnectionString = startupConfig.GetString("estate_connection_string", m_configSettings.StorageConnectionString); m_configSettings.AssetStorage = startupConfig.GetString("asset_database"); m_configSettings.ClientstackDll = startupConfig.GetString("clientstack_plugin"); } @@ -589,9 +589,14 @@ namespace OpenSim Scene target; if (m_sceneManager.TryGetScene(name, out target)) RemoveRegion(target, cleanUp); - } + } - protected override StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring) + protected override StorageManager CreateStorageManager() + { + return CreateStorageManager(m_configSettings.StorageConnectionString, m_configSettings.EstateConnectionString); + } + + protected StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring) { return new StorageManager(m_configSettings.StorageDll, connectionstring, estateconnectionstring); } diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index b671fc5e9c..cac4591cce 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -61,9 +61,7 @@ namespace OpenSim.Region.ClientStack protected SceneManager m_sceneManager = new SceneManager(); protected StorageManager m_storageManager; - protected string m_storageConnectionString; - protected string m_estateConnectionString; - + protected ClientStackManager m_clientStackManager; public SceneManager SceneManager @@ -73,14 +71,14 @@ namespace OpenSim.Region.ClientStack protected abstract void Initialize(); protected abstract PhysicsScene GetPhysicsScene(); - protected abstract StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring); + protected abstract StorageManager CreateStorageManager(); protected abstract ClientStackManager CreateClientStackManager(); protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, AgentCircuitManager circuitManager); protected override void StartupSpecific() { - m_storageManager = CreateStorageManager(m_storageConnectionString, m_estateConnectionString); + m_storageManager = CreateStorageManager(); m_clientStackManager = CreateClientStackManager();