From 314181a70d00d99506d3752653f1b0b87512ea44 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 26 Jun 2008 17:23:05 +0000 Subject: small change to last commit --- .../LoadRegions/LoadRegionsPlugin.cs | 8 ++-- .../RemoteController/RemoteAdminPlugin.cs | 6 +-- OpenSim/ApplicationPlugins/Rest/RestPlugin.cs | 4 +- OpenSim/Region/Application/OpenSim.cs | 4 +- OpenSim/Region/Application/OpenSimBase.cs | 46 +++++++++++----------- 5 files changed, 34 insertions(+), 34 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 01ea3eb..4b11fd4 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -51,7 +51,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); IRegionLoader regionLoader; - if (openSim.ConfigSource.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") + if (openSim.ConfigSource.Source.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") { m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); regionLoader = new RegionLoaderFileSystem(); @@ -62,7 +62,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions regionLoader = new RegionLoaderWebServer(); } - regionLoader.SetIniConfigSource(openSim.ConfigSource.ConfigSource); + regionLoader.SetIniConfigSource(openSim.ConfigSource.Source); RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); openSim.ModuleLoader.LoadDefaultSharedModules(); @@ -89,7 +89,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); IRegionLoader regionLoader; - if (openSim.ConfigSource.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") + if (openSim.ConfigSource.Source.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") { m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); regionLoader = new RegionLoaderFileSystem(); @@ -100,7 +100,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions regionLoader = new RegionLoaderWebServer(); } - regionLoader.SetIniConfigSource(openSim.ConfigSource.ConfigSource); + regionLoader.SetIniConfigSource(openSim.ConfigSource.Source); RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); for (int i = 0; i < regionsToLoad.Length; i++) { diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 947f833..5063375 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -58,11 +58,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController { try { - if (openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"] != null && - openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) + if (openSim.ConfigSource.Source.Configs["RemoteAdmin"] != null && + openSim.ConfigSource.Source.Configs["RemoteAdmin"].GetBoolean("enabled", false)) { m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); - requiredPassword = openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty); + requiredPassword = openSim.ConfigSource.Source.Configs["RemoteAdmin"].GetString("access_password", String.Empty); m_app = openSim; m_httpd = openSim.HttpServer; diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs index 60a7d27..4558d4d 100644 --- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs +++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs @@ -203,7 +203,7 @@ namespace OpenSim.ApplicationPlugins.Rest try { - if ((_config = openSim.ConfigSource.ConfigSource.Configs["RestPlugins"]) == null) + if ((_config = openSim.ConfigSource.Source.Configs["RestPlugins"]) == null) { m_log.WarnFormat("{0} Rest Plugins not configured", MsgID); return; @@ -225,7 +225,7 @@ namespace OpenSim.ApplicationPlugins.Rest _prefix = _config.GetString("prefix", "/admin"); // Get plugin specific config - _pluginConfig = openSim.ConfigSource.ConfigSource.Configs[ConfigName]; + _pluginConfig = openSim.ConfigSource.Source.Configs[ConfigName]; m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 4738dfc..8b42e2e 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -69,7 +69,7 @@ namespace OpenSim protected override void ReadConfigSettings() { - IConfig startupConfig = m_config.ConfigSource.Configs["Startup"]; + IConfig startupConfig = m_config.Source.Configs["Startup"]; if (startupConfig != null) { @@ -528,7 +528,7 @@ namespace OpenSim c = DefaultConfig().AddConfig(cmdparams[1]); string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3); c.Set(cmdparams[2], _value); - m_config.ConfigSource.Merge(c.ConfigSource); + m_config.Source.Merge(c.ConfigSource); m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + _value); diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 255a125..49e1da3 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -170,22 +170,22 @@ namespace OpenSim Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); m_config = new OpenSimConfigSource(); - m_config.ConfigSource = new IniConfigSource(); + m_config.Source = new IniConfigSource(); IConfigSource icong; //check for .INI file (either default or name passed in command line) if (File.Exists(Application.iniFilePath)) { - m_config.ConfigSource.Merge(new IniConfigSource(Application.iniFilePath)); - m_config.ConfigSource.Merge(configSource); + m_config.Source.Merge(new IniConfigSource(Application.iniFilePath)); + m_config.Source.Merge(configSource); } else { Application.iniFilePath = Path.Combine(Util.configDir(), Application.iniFilePath); if (File.Exists(Application.iniFilePath)) { - m_config.ConfigSource.Merge(new IniConfigSource(Application.iniFilePath)); - m_config.ConfigSource.Merge(configSource); + m_config.Source.Merge(new IniConfigSource(Application.iniFilePath)); + m_config.Source.Merge(configSource); } else { @@ -193,17 +193,17 @@ namespace OpenSim { //chech for a xml config file Application.iniFilePath = "OpenSim.xml"; - m_config.ConfigSource = new XmlConfigSource(); - m_config.ConfigSource.Merge(new XmlConfigSource(Application.iniFilePath)); - m_config.ConfigSource.Merge(configSource); + m_config.Source = new XmlConfigSource(); + m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath)); + m_config.Source.Merge(configSource); } else { //Application.iniFilePath = "OpenSim.xml"; // m_config.ConfigSource = new XmlConfigSource(); // no default config files, so set default values, and save it - m_config.ConfigSource.Merge(DefaultConfig()); - m_config.ConfigSource.Merge(configSource); + m_config.Source.Merge(DefaultConfig()); + m_config.Source.Merge(configSource); m_config.Save(Application.iniFilePath); } } @@ -294,7 +294,7 @@ namespace OpenSim { m_networkServersInfo = new NetworkServersInfo(); - IConfig startupConfig = m_config.ConfigSource.Configs["Startup"]; + IConfig startupConfig = m_config.Source.Configs["Startup"]; if (startupConfig != null) { @@ -323,7 +323,7 @@ namespace OpenSim m_clientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); } - IConfig standaloneConfig = m_config.ConfigSource.Configs["StandAlone"]; + IConfig standaloneConfig = m_config.Source.Configs["StandAlone"]; if (standaloneConfig != null) { m_standaloneAuthenticate = standaloneConfig.GetBoolean("accounts_authenticate", false); @@ -344,7 +344,7 @@ namespace OpenSim m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); } - m_networkServersInfo.loadFromConfiguration(m_config.ConfigSource); + m_networkServersInfo.loadFromConfiguration(m_config.Source); } /// @@ -397,11 +397,11 @@ namespace OpenSim m_httpServer.AddStreamHandler(new SimStatusHandler()); } - proxyUrl = ConfigSource.ConfigSource.Configs["Network"].GetString("proxy_url", ""); - proxyOffset = Int32.Parse(ConfigSource.ConfigSource.Configs["Network"].GetString("proxy_offset", "0")); + proxyUrl = ConfigSource.Source.Configs["Network"].GetString("proxy_url", ""); + proxyOffset = Int32.Parse(ConfigSource.Source.Configs["Network"].GetString("proxy_offset", "0")); // Create a ModuleLoader instance - m_moduleLoader = new ModuleLoader(m_config.ConfigSource); + m_moduleLoader = new ModuleLoader(m_config.Source); ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); foreach (TypeExtensionNode node in nodes) @@ -586,7 +586,7 @@ namespace OpenSim return new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, - m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config.ConfigSource, + m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config.Source, m_version); } @@ -635,7 +635,7 @@ namespace OpenSim protected override PhysicsScene GetPhysicsScene() { - return GetPhysicsScene(m_physicsEngine, m_meshEngineName, m_config.ConfigSource); + return GetPhysicsScene(m_physicsEngine, m_meshEngineName, m_config.Source); } /// @@ -722,18 +722,18 @@ namespace OpenSim public class OpenSimConfigSource { - public IConfigSource ConfigSource; + public IConfigSource Source; public void Save(string path) { - if (ConfigSource is IniConfigSource) + if (Source is IniConfigSource) { - IniConfigSource iniCon = (IniConfigSource)ConfigSource; + IniConfigSource iniCon = (IniConfigSource)Source; iniCon.Save(path); } - else if (ConfigSource is XmlConfigSource) + else if (Source is XmlConfigSource) { - XmlConfigSource xmlCon = (XmlConfigSource)ConfigSource; + XmlConfigSource xmlCon = (XmlConfigSource)Source; xmlCon.Save(path); } } -- cgit v1.1