mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 13:15:44 +08:00
Allow some values that are set in OpenSim.ini to be set from region config
XML as well.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user