From 0138fdc5fddbe30924484686716465984e8f59c2 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 2 Jan 2009 17:41:12 +0000 Subject: Allow some values that are set in OpenSim.ini to be set from region config XML as well. --- .../RegionLoader/Filesystem/RegionLoaderFileSystem.cs | 4 ++-- OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Framework/RegionLoader') diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs index a371851..05ccc4d 100644 --- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs +++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs @@ -63,14 +63,14 @@ namespace OpenSim.Framework.RegionLoader.Filesystem if (configFiles.Length == 0) { - new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "default.xml"), false); + new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "default.xml"), false, m_configSource); configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); } RegionInfo[] regionInfos = new RegionInfo[configFiles.Length]; for (int i = 0; i < configFiles.Length; i++) { - RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i], false); + RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i], false, m_configSource); regionInfos[i] = regionInfo; } diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs index 029d396..60242e6 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs @@ -39,23 +39,23 @@ namespace OpenSim.Framework.RegionLoader.Web { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private IConfigSource m_configSouce; + private IConfigSource m_configSource; public void SetIniConfigSource(IConfigSource configSource) { - m_configSouce = configSource; + m_configSource = configSource; } public RegionInfo[] LoadRegions() { - if (m_configSouce == null) + if (m_configSource == null) { m_log.Error("[WEBLOADER]: Unable to load configuration source!"); return null; } else { - IConfig startupConfig = (IConfig) m_configSouce.Configs["Startup"]; + IConfig startupConfig = (IConfig) m_configSource.Configs["Startup"]; string url = startupConfig.GetString("regionload_webserver_url", String.Empty).Trim(); if (url == String.Empty) { @@ -89,7 +89,7 @@ namespace OpenSim.Framework.RegionLoader.Web { m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); regionInfos[i] = - new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false); + new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false,m_configSource); } return regionInfos; -- cgit v1.1