make a change to make it possible to get access to the DefaultConfig
from other places.afrisby
parent
a0d1496475
commit
368333e52c
|
@ -142,7 +142,7 @@ namespace OpenSim
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no default config files, so set default values, and save it
|
// no default config files, so set default values, and save it
|
||||||
SetDefaultConfig();
|
m_config.Merge(DefaultConfig());
|
||||||
|
|
||||||
m_config.Merge(configSource);
|
m_config.Merge(configSource);
|
||||||
|
|
||||||
|
@ -153,11 +153,12 @@ namespace OpenSim
|
||||||
ReadConfigSettings();
|
ReadConfigSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SetDefaultConfig()
|
public static IConfigSource DefaultConfig()
|
||||||
{
|
{
|
||||||
if (m_config.Configs["Startup"] == null)
|
IConfigSource DefaultConfig = new IniConfigSource();
|
||||||
m_config.AddConfig("Startup");
|
if (DefaultConfig.Configs["Startup"] == null)
|
||||||
IConfig config = m_config.Configs["Startup"];
|
DefaultConfig.AddConfig("Startup");
|
||||||
|
IConfig config = DefaultConfig.Configs["Startup"];
|
||||||
if (config != null)
|
if (config != null)
|
||||||
{
|
{
|
||||||
config.Set("gridmode", false);
|
config.Set("gridmode", false);
|
||||||
|
@ -173,10 +174,10 @@ namespace OpenSim
|
||||||
config.Set("asset_database", "sqlite");
|
config.Set("asset_database", "sqlite");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_config.Configs["StandAlone"] == null)
|
if (DefaultConfig.Configs["StandAlone"] == null)
|
||||||
m_config.AddConfig("StandAlone");
|
DefaultConfig.AddConfig("StandAlone");
|
||||||
|
|
||||||
config = m_config.Configs["StandAlone"];
|
config = DefaultConfig.Configs["StandAlone"];
|
||||||
if (config != null)
|
if (config != null)
|
||||||
{
|
{
|
||||||
config.Set("accounts_authenticate", false);
|
config.Set("accounts_authenticate", false);
|
||||||
|
@ -187,9 +188,9 @@ namespace OpenSim
|
||||||
config.Set("dump_assets_to_file", false);
|
config.Set("dump_assets_to_file", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_config.Configs["Network"] == null)
|
if (DefaultConfig.Configs["Network"] == null)
|
||||||
m_config.AddConfig("Network");
|
DefaultConfig.AddConfig("Network");
|
||||||
config = m_config.Configs["Network"];
|
config = DefaultConfig.Configs["Network"];
|
||||||
if (config != null)
|
if (config != null)
|
||||||
{
|
{
|
||||||
config.Set("default_location_x", 1000);
|
config.Set("default_location_x", 1000);
|
||||||
|
@ -206,13 +207,14 @@ namespace OpenSim
|
||||||
config.Set("inventory_server_url", "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString());
|
config.Set("inventory_server_url", "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_config.Configs["RemoteAdmin"] == null)
|
if (DefaultConfig.Configs["RemoteAdmin"] == null)
|
||||||
m_config.AddConfig("RemoteAdmin");
|
DefaultConfig.AddConfig("RemoteAdmin");
|
||||||
config = m_config.Configs["RemoteAdmin"];
|
config = DefaultConfig.Configs["RemoteAdmin"];
|
||||||
if (config != null)
|
if (config != null)
|
||||||
{
|
{
|
||||||
config.Set("enabled", "false");
|
config.Set("enabled", "false");
|
||||||
}
|
}
|
||||||
|
return DefaultConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ReadConfigSettings()
|
protected void ReadConfigSettings()
|
||||||
|
|
Loading…
Reference in New Issue