diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 54dd51d..f845bf8 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -150,8 +150,7 @@ namespace OpenSim | |||
150 | set { m_moduleLoader = value; } | 150 | set { m_moduleLoader = value; } |
151 | } | 151 | } |
152 | 152 | ||
153 | public OpenSimBase(IConfigSource configSource) | 153 | public OpenSimBase(IConfigSource configSource) : base() |
154 | : base() | ||
155 | { | 154 | { |
156 | IConfig startupConfig = configSource.Configs["Startup"]; | 155 | IConfig startupConfig = configSource.Configs["Startup"]; |
157 | 156 | ||
@@ -179,7 +178,7 @@ namespace OpenSim | |||
179 | { | 178 | { |
180 | if (File.Exists("OpenSim.xml")) | 179 | if (File.Exists("OpenSim.xml")) |
181 | { | 180 | { |
182 | //check for a xml config file | 181 | // check for a xml config file |
183 | Application.iniFilePath = "OpenSim.xml"; | 182 | Application.iniFilePath = "OpenSim.xml"; |
184 | m_config.Source = new XmlConfigSource(); | 183 | m_config.Source = new XmlConfigSource(); |
185 | m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath)); | 184 | m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath)); |
@@ -187,9 +186,7 @@ namespace OpenSim | |||
187 | } | 186 | } |
188 | else | 187 | else |
189 | { | 188 | { |
190 | //Application.iniFilePath = "OpenSim.xml"; | 189 | // using OpenSim.ini instead |
191 | // m_config.ConfigSource = new XmlConfigSource(); | ||
192 | // no default config files, so set default values, and save it | ||
193 | m_config.Source.Merge(DefaultConfig()); | 190 | m_config.Source.Merge(DefaultConfig()); |
194 | m_config.Source.Merge(configSource); | 191 | m_config.Source.Merge(configSource); |
195 | m_config.Save(Application.iniFilePath); | 192 | m_config.Save(Application.iniFilePath); |
@@ -293,7 +290,6 @@ namespace OpenSim | |||
293 | } | 290 | } |
294 | 291 | ||
295 | return DefaultConfig; | 292 | return DefaultConfig; |
296 | |||
297 | } | 293 | } |
298 | 294 | ||
299 | protected virtual void ReadConfigSettings() | 295 | protected virtual void ReadConfigSettings() |
@@ -354,14 +350,15 @@ namespace OpenSim | |||
354 | protected void LoadPlugins() | 350 | protected void LoadPlugins() |
355 | { | 351 | { |
356 | PluginLoader<IApplicationPlugin> loader = | 352 | PluginLoader<IApplicationPlugin> loader = |
357 | new PluginLoader<IApplicationPlugin> (new ApplicationPluginInitialiser (this)); | 353 | new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this)); |
358 | 354 | ||
359 | loader.Load ("/OpenSim/Startup"); | 355 | loader.Load("/OpenSim/Startup"); |
360 | m_plugins = loader.Plugins; | 356 | m_plugins = loader.Plugins; |
361 | } | 357 | } |
362 | 358 | ||
363 | /// <summary> | 359 | /// <summary> |
364 | /// Performs initialisation of the scene, such as loading configuration from disk. | 360 | /// Performs startup specific to this region server, including initialization of the scene |
361 | /// such as loading configuration from disk. | ||
365 | /// </summary> | 362 | /// </summary> |
366 | protected override void StartupSpecific() | 363 | protected override void StartupSpecific() |
367 | { | 364 | { |
@@ -501,9 +498,7 @@ namespace OpenSim | |||
501 | regionInfo.originRegionID = regionInfo.RegionID; | 498 | regionInfo.originRegionID = regionInfo.RegionID; |
502 | 499 | ||
503 | // set initial ServerURI | 500 | // set initial ServerURI |
504 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName | 501 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.InternalEndPoint.Port; |
505 | + ":" + regionInfo.InternalEndPoint.Port.ToString(); | ||
506 | |||
507 | regionInfo.HttpPort = m_httpServerPort; | 502 | regionInfo.HttpPort = m_httpServerPort; |
508 | 503 | ||
509 | if ((proxyUrl.Length > 0) && (portadd_flag)) | 504 | if ((proxyUrl.Length > 0) && (portadd_flag)) |
@@ -514,11 +509,12 @@ namespace OpenSim | |||
514 | } | 509 | } |
515 | 510 | ||
516 | IClientNetworkServer clientServer; | 511 | IClientNetworkServer clientServer; |
517 | Scene scene = SetupScene(regionInfo, proxyOffset, out clientServer); | 512 | Scene scene = SetupScene(regionInfo, proxyOffset, null, out clientServer); |
518 | 513 | ||
519 | m_log.Info("[MODULES]: Loading Region's modules"); | 514 | m_log.Info("[MODULES]: Loading Region's modules"); |
520 | 515 | ||
521 | List<IRegionModule> modules = m_moduleLoader.PickupModules(scene, "."); | 516 | List<IRegionModule> modules = m_moduleLoader.PickupModules(scene, "."); |
517 | |||
522 | // This needs to be ahead of the script engine load, so the | 518 | // This needs to be ahead of the script engine load, so the |
523 | // script module can pick up events exposed by a module | 519 | // script module can pick up events exposed by a module |
524 | m_moduleLoader.InitialiseSharedModules(scene); | 520 | m_moduleLoader.InitialiseSharedModules(scene); |
@@ -530,7 +526,7 @@ namespace OpenSim | |||
530 | 526 | ||
531 | scene.StartTimer(); | 527 | scene.StartTimer(); |
532 | 528 | ||
533 | //moved these here as the terrain texture has to be created after the modules are initialized | 529 | // moved these here as the terrain texture has to be created after the modules are initialized |
534 | // and has to happen before the region is registered with the grid. | 530 | // and has to happen before the region is registered with the grid. |
535 | scene.CreateTerrainTexture(false); | 531 | scene.CreateTerrainTexture(false); |
536 | 532 | ||