diff options
author | Sean Dague | 2007-12-14 17:50:02 +0000 |
---|---|---|
committer | Sean Dague | 2007-12-14 17:50:02 +0000 |
commit | 368333e52ce9788daa895a4cf2f8c9a659fd3257 (patch) | |
tree | a7281cc4d6fb4752058e7aff76ae358e91a3f75c | |
parent | * Fixed a cause of an ODE 'invalid operation for locked space ' (diff) | |
download | opensim-SC-368333e52ce9788daa895a4cf2f8c9a659fd3257.zip opensim-SC-368333e52ce9788daa895a4cf2f8c9a659fd3257.tar.gz opensim-SC-368333e52ce9788daa895a4cf2f8c9a659fd3257.tar.bz2 opensim-SC-368333e52ce9788daa895a4cf2f8c9a659fd3257.tar.xz |
make a change to make it possible to get access to the DefaultConfig
from other places.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 542c5cd..478de56 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -142,7 +142,7 @@ namespace OpenSim | |||
142 | else | 142 | else |
143 | { | 143 | { |
144 | // no default config files, so set default values, and save it | 144 | // no default config files, so set default values, and save it |
145 | SetDefaultConfig(); | 145 | m_config.Merge(DefaultConfig()); |
146 | 146 | ||
147 | m_config.Merge(configSource); | 147 | m_config.Merge(configSource); |
148 | 148 | ||
@@ -153,11 +153,12 @@ namespace OpenSim | |||
153 | ReadConfigSettings(); | 153 | ReadConfigSettings(); |
154 | } | 154 | } |
155 | 155 | ||
156 | protected void SetDefaultConfig() | 156 | public static IConfigSource DefaultConfig() |
157 | { | 157 | { |
158 | if (m_config.Configs["Startup"] == null) | 158 | IConfigSource DefaultConfig = new IniConfigSource(); |
159 | m_config.AddConfig("Startup"); | 159 | if (DefaultConfig.Configs["Startup"] == null) |
160 | IConfig config = m_config.Configs["Startup"]; | 160 | DefaultConfig.AddConfig("Startup"); |
161 | IConfig config = DefaultConfig.Configs["Startup"]; | ||
161 | if (config != null) | 162 | if (config != null) |
162 | { | 163 | { |
163 | config.Set("gridmode", false); | 164 | config.Set("gridmode", false); |
@@ -173,10 +174,10 @@ namespace OpenSim | |||
173 | config.Set("asset_database", "sqlite"); | 174 | config.Set("asset_database", "sqlite"); |
174 | } | 175 | } |
175 | 176 | ||
176 | if (m_config.Configs["StandAlone"] == null) | 177 | if (DefaultConfig.Configs["StandAlone"] == null) |
177 | m_config.AddConfig("StandAlone"); | 178 | DefaultConfig.AddConfig("StandAlone"); |
178 | 179 | ||
179 | config = m_config.Configs["StandAlone"]; | 180 | config = DefaultConfig.Configs["StandAlone"]; |
180 | if (config != null) | 181 | if (config != null) |
181 | { | 182 | { |
182 | config.Set("accounts_authenticate", false); | 183 | config.Set("accounts_authenticate", false); |
@@ -187,9 +188,9 @@ namespace OpenSim | |||
187 | config.Set("dump_assets_to_file", false); | 188 | config.Set("dump_assets_to_file", false); |
188 | } | 189 | } |
189 | 190 | ||
190 | if (m_config.Configs["Network"] == null) | 191 | if (DefaultConfig.Configs["Network"] == null) |
191 | m_config.AddConfig("Network"); | 192 | DefaultConfig.AddConfig("Network"); |
192 | config = m_config.Configs["Network"]; | 193 | config = DefaultConfig.Configs["Network"]; |
193 | if (config != null) | 194 | if (config != null) |
194 | { | 195 | { |
195 | config.Set("default_location_x", 1000); | 196 | config.Set("default_location_x", 1000); |
@@ -206,13 +207,14 @@ namespace OpenSim | |||
206 | config.Set("inventory_server_url", "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString()); | 207 | config.Set("inventory_server_url", "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString()); |
207 | } | 208 | } |
208 | 209 | ||
209 | if (m_config.Configs["RemoteAdmin"] == null) | 210 | if (DefaultConfig.Configs["RemoteAdmin"] == null) |
210 | m_config.AddConfig("RemoteAdmin"); | 211 | DefaultConfig.AddConfig("RemoteAdmin"); |
211 | config = m_config.Configs["RemoteAdmin"]; | 212 | config = DefaultConfig.Configs["RemoteAdmin"]; |
212 | if (config != null) | 213 | if (config != null) |
213 | { | 214 | { |
214 | config.Set("enabled", "false"); | 215 | config.Set("enabled", "false"); |
215 | } | 216 | } |
217 | return DefaultConfig; | ||
216 | } | 218 | } |
217 | 219 | ||
218 | protected void ReadConfigSettings() | 220 | protected void ReadConfigSettings() |