aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/ConfigurationLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/ConfigurationLoader.cs')
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs53
1 files changed, 10 insertions, 43 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 21edcc5..cac5fa9 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -42,6 +42,8 @@ namespace OpenSim
42 /// </summary> 42 /// </summary>
43 public class ConfigurationLoader 43 public class ConfigurationLoader
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46
45 /// <summary> 47 /// <summary>
46 /// Various Config settings the region needs to start 48 /// Various Config settings the region needs to start
47 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, 49 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor,
@@ -61,17 +63,6 @@ namespace OpenSim
61 protected NetworkServersInfo m_networkServersInfo; 63 protected NetworkServersInfo m_networkServersInfo;
62 64
63 /// <summary> 65 /// <summary>
64 /// Console logger
65 /// </summary>
66 private static readonly ILog m_log =
67 LogManager.GetLogger(
68 MethodBase.GetCurrentMethod().DeclaringType);
69
70 public ConfigurationLoader()
71 {
72 }
73
74 /// <summary>
75 /// Loads the region configuration 66 /// Loads the region configuration
76 /// </summary> 67 /// </summary>
77 /// <param name="argvSource">Parameters passed into the process when started</param> 68 /// <param name="argvSource">Parameters passed into the process when started</param>
@@ -164,12 +155,12 @@ namespace OpenSim
164 m_config.Source = new IniConfigSource(); 155 m_config.Source = new IniConfigSource();
165 m_config.Source.Merge(DefaultConfig()); 156 m_config.Source.Merge(DefaultConfig());
166 157
167 m_log.Info("[CONFIG] Reading configuration settings"); 158 m_log.Info("[CONFIG]: Reading configuration settings");
168 159
169 if (sources.Count == 0) 160 if (sources.Count == 0)
170 { 161 {
171 m_log.FatalFormat("[CONFIG] Could not load any configuration"); 162 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
172 m_log.FatalFormat("[CONFIG] Did you copy the OpenSim.ini.example file to OpenSim.ini?"); 163 m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?");
173 Environment.Exit(1); 164 Environment.Exit(1);
174 } 165 }
175 166
@@ -182,13 +173,12 @@ namespace OpenSim
182 173
183 if (!iniFileExists) 174 if (!iniFileExists)
184 { 175 {
185 m_log.FatalFormat("[CONFIG] Could not load any configuration"); 176 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
186 m_log.FatalFormat("[CONFIG] Configuration exists, but there was an error loading it!"); 177 m_log.FatalFormat("[CONFIG]: Configuration exists, but there was an error loading it!");
187 Environment.Exit(1); 178 Environment.Exit(1);
188 } 179 }
189 180
190 // Make sure command line options take precedence 181 // Make sure command line options take precedence
191 //
192 m_config.Source.Merge(argvSource); 182 m_config.Source.Merge(argvSource);
193 183
194 ReadConfigSettings(); 184 ReadConfigSettings();
@@ -257,20 +247,17 @@ namespace OpenSim
257 247
258 if (!IsUri(iniPath)) 248 if (!IsUri(iniPath))
259 { 249 {
260 m_log.InfoFormat("[CONFIG] Reading configuration file {0}", 250 m_log.InfoFormat("[CONFIG]: Reading configuration file {0}", Path.GetFullPath(iniPath));
261 Path.GetFullPath(iniPath));
262 251
263 m_config.Source.Merge(new IniConfigSource(iniPath)); 252 m_config.Source.Merge(new IniConfigSource(iniPath));
264 success = true; 253 success = true;
265 } 254 }
266 else 255 else
267 { 256 {
268 m_log.InfoFormat("[CONFIG] {0} is a http:// URI, fetching ...", 257 m_log.InfoFormat("[CONFIG]: {0} is a http:// URI, fetching ...", iniPath);
269 iniPath);
270 258
271 // The ini file path is a http URI 259 // The ini file path is a http URI
272 // Try to read it 260 // Try to read it
273 //
274 try 261 try
275 { 262 {
276 XmlReader r = XmlReader.Create(iniPath); 263 XmlReader r = XmlReader.Create(iniPath);
@@ -281,7 +268,7 @@ namespace OpenSim
281 } 268 }
282 catch (Exception e) 269 catch (Exception e)
283 { 270 {
284 m_log.FatalFormat("[CONFIG] Exception reading config from URI {0}\n" + e.ToString(), iniPath); 271 m_log.FatalFormat("[CONFIG]: Exception reading config from URI {0}\n" + e.ToString(), iniPath);
285 Environment.Exit(1); 272 Environment.Exit(1);
286 } 273 }
287 } 274 }
@@ -304,7 +291,6 @@ namespace OpenSim
304 291
305 config.Set("region_info_source", "filesystem"); 292 config.Set("region_info_source", "filesystem");
306 293
307 config.Set("gridmode", false);
308 config.Set("physics", "OpenDynamicsEngine"); 294 config.Set("physics", "OpenDynamicsEngine");
309 config.Set("meshing", "Meshmerizer"); 295 config.Set("meshing", "Meshmerizer");
310 config.Set("physical_prim", true); 296 config.Set("physical_prim", true);
@@ -342,19 +328,7 @@ namespace OpenSim
342 if (null == config) 328 if (null == config)
343 config = defaultConfig.AddConfig("Network"); 329 config = defaultConfig.AddConfig("Network");
344 330
345 config.Set("default_location_x", 1000);
346 config.Set("default_location_y", 1000);
347 config.Set("http_listener_port", ConfigSettings.DefaultRegionHttpPort); 331 config.Set("http_listener_port", ConfigSettings.DefaultRegionHttpPort);
348 config.Set("remoting_listener_port", ConfigSettings.DefaultRegionRemotingPort);
349 config.Set("grid_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultGridServerHttpPort.ToString());
350 config.Set("grid_send_key", "null");
351 config.Set("grid_recv_key", "null");
352 config.Set("user_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultUserServerHttpPort.ToString());
353 config.Set("user_send_key", "null");
354 config.Set("user_recv_key", "null");
355 config.Set("asset_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultAssetServerHttpPort.ToString());
356 config.Set("inventory_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultInventoryServerHttpPort.ToString());
357 config.Set("secure_inventory_server", "true");
358 } 332 }
359 333
360 return defaultConfig; 334 return defaultConfig;
@@ -368,7 +342,6 @@ namespace OpenSim
368 IConfig startupConfig = m_config.Source.Configs["Startup"]; 342 IConfig startupConfig = m_config.Source.Configs["Startup"];
369 if (startupConfig != null) 343 if (startupConfig != null)
370 { 344 {
371 m_configSettings.Standalone = !startupConfig.GetBoolean("gridmode", false);
372 m_configSettings.PhysicsEngine = startupConfig.GetString("physics"); 345 m_configSettings.PhysicsEngine = startupConfig.GetString("physics");
373 m_configSettings.MeshEngineName = startupConfig.GetString("meshing"); 346 m_configSettings.MeshEngineName = startupConfig.GetString("meshing");
374 m_configSettings.PhysicalPrim = startupConfig.GetBoolean("physical_prim", true); 347 m_configSettings.PhysicalPrim = startupConfig.GetBoolean("physical_prim", true);
@@ -376,12 +349,6 @@ namespace OpenSim
376 m_configSettings.See_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true); 349 m_configSettings.See_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true);
377 350
378 m_configSettings.StorageDll = startupConfig.GetString("storage_plugin"); 351 m_configSettings.StorageDll = startupConfig.GetString("storage_plugin");
379 if (m_configSettings.StorageDll == "OpenSim.DataStore.MonoSqlite.dll")
380 {
381 m_configSettings.StorageDll = "OpenSim.Data.SQLite.dll";
382 m_log.Warn("WARNING: OpenSim.DataStore.MonoSqlite.dll is deprecated. Set storage_plugin to OpenSim.Data.SQLite.dll.");
383 Thread.Sleep(3000);
384 }
385 352
386 m_configSettings.StorageConnectionString 353 m_configSettings.StorageConnectionString
387 = startupConfig.GetString("storage_connection_string"); 354 = startupConfig.GetString("storage_connection_string");