diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index bed9a49..7497d88 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -138,6 +138,10 @@ namespace OpenSim | |||
138 | /// <param name="configSource"></param> | 138 | /// <param name="configSource"></param> |
139 | public OpenSimBase(IConfigSource configSource) : base() | 139 | public OpenSimBase(IConfigSource configSource) : base() |
140 | { | 140 | { |
141 | // FIXME: This should be done down in ServerBase but we need to sort out and refactor the log4net | ||
142 | // XmlConfigurator calls first accross servers. | ||
143 | m_log.InfoFormat("[SERVER BASE]: Starting in {0}", m_startupDirectory); | ||
144 | |||
141 | LoadConfigSettings(configSource); | 145 | LoadConfigSettings(configSource); |
142 | } | 146 | } |
143 | 147 | ||
@@ -331,7 +335,7 @@ namespace OpenSim | |||
331 | /// <param name="regionInfo"></param> | 335 | /// <param name="regionInfo"></param> |
332 | /// <param name="portadd_flag"></param> | 336 | /// <param name="portadd_flag"></param> |
333 | /// <returns></returns> | 337 | /// <returns></returns> |
334 | public IClientNetworkServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, out IScene scene) | 338 | public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, bool portadd_flag, out IScene scene) |
335 | { | 339 | { |
336 | return CreateRegion(regionInfo, portadd_flag, false, out scene); | 340 | return CreateRegion(regionInfo, portadd_flag, false, out scene); |
337 | } | 341 | } |
@@ -341,7 +345,7 @@ namespace OpenSim | |||
341 | /// </summary> | 345 | /// </summary> |
342 | /// <param name="regionInfo"></param> | 346 | /// <param name="regionInfo"></param> |
343 | /// <returns></returns> | 347 | /// <returns></returns> |
344 | public IClientNetworkServer CreateRegion(RegionInfo regionInfo, out IScene scene) | 348 | public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, out IScene scene) |
345 | { | 349 | { |
346 | return CreateRegion(regionInfo, false, true, out scene); | 350 | return CreateRegion(regionInfo, false, true, out scene); |
347 | } | 351 | } |
@@ -353,7 +357,7 @@ namespace OpenSim | |||
353 | /// <param name="portadd_flag"></param> | 357 | /// <param name="portadd_flag"></param> |
354 | /// <param name="do_post_init"></param> | 358 | /// <param name="do_post_init"></param> |
355 | /// <returns></returns> | 359 | /// <returns></returns> |
356 | public IClientNetworkServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene) | 360 | public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene) |
357 | { | 361 | { |
358 | int port = regionInfo.InternalEndPoint.Port; | 362 | int port = regionInfo.InternalEndPoint.Port; |
359 | 363 | ||
@@ -378,8 +382,8 @@ namespace OpenSim | |||
378 | Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); | 382 | Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); |
379 | } | 383 | } |
380 | 384 | ||
381 | IClientNetworkServer clientServer; | 385 | List<IClientNetworkServer> clientServers; |
382 | Scene scene = SetupScene(regionInfo, proxyOffset, Config, out clientServer); | 386 | Scene scene = SetupScene(regionInfo, proxyOffset, Config, out clientServers); |
383 | 387 | ||
384 | m_log.Info("[MODULES]: Loading Region's modules (old style)"); | 388 | m_log.Info("[MODULES]: Loading Region's modules (old style)"); |
385 | 389 | ||
@@ -483,8 +487,11 @@ namespace OpenSim | |||
483 | 487 | ||
484 | if (m_autoCreateClientStack) | 488 | if (m_autoCreateClientStack) |
485 | { | 489 | { |
486 | m_clientServers.Add(clientServer); | 490 | foreach (IClientNetworkServer clientserver in clientServers) |
487 | clientServer.Start(); | 491 | { |
492 | m_clientServers.Add(clientserver); | ||
493 | clientserver.Start(); | ||
494 | } | ||
488 | } | 495 | } |
489 | 496 | ||
490 | if (scene.SnmpService != null) | 497 | if (scene.SnmpService != null) |
@@ -504,7 +511,7 @@ namespace OpenSim | |||
504 | scene.Start(); | 511 | scene.Start(); |
505 | scene.StartScripts(); | 512 | scene.StartScripts(); |
506 | 513 | ||
507 | return clientServer; | 514 | return clientServers; |
508 | } | 515 | } |
509 | 516 | ||
510 | /// <summary> | 517 | /// <summary> |
@@ -725,7 +732,7 @@ namespace OpenSim | |||
725 | /// <param name="regionInfo"></param> | 732 | /// <param name="regionInfo"></param> |
726 | /// <param name="clientServer"> </param> | 733 | /// <param name="clientServer"> </param> |
727 | /// <returns></returns> | 734 | /// <returns></returns> |
728 | protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer) | 735 | protected Scene SetupScene(RegionInfo regionInfo, out List<IClientNetworkServer> clientServer) |
729 | { | 736 | { |
730 | return SetupScene(regionInfo, 0, null, out clientServer); | 737 | return SetupScene(regionInfo, 0, null, out clientServer); |
731 | } | 738 | } |
@@ -739,8 +746,10 @@ namespace OpenSim | |||
739 | /// <param name="clientServer"> </param> | 746 | /// <param name="clientServer"> </param> |
740 | /// <returns></returns> | 747 | /// <returns></returns> |
741 | protected Scene SetupScene( | 748 | protected Scene SetupScene( |
742 | RegionInfo regionInfo, int proxyOffset, IConfigSource configSource, out IClientNetworkServer clientServer) | 749 | RegionInfo regionInfo, int proxyOffset, IConfigSource configSource, out List<IClientNetworkServer> clientServer) |
743 | { | 750 | { |
751 | List<IClientNetworkServer> clientNetworkServers = null; | ||
752 | |||
744 | AgentCircuitManager circuitManager = new AgentCircuitManager(); | 753 | AgentCircuitManager circuitManager = new AgentCircuitManager(); |
745 | IPAddress listenIP = regionInfo.InternalEndPoint.Address; | 754 | IPAddress listenIP = regionInfo.InternalEndPoint.Address; |
746 | //if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP)) | 755 | //if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP)) |
@@ -750,8 +759,7 @@ namespace OpenSim | |||
750 | 759 | ||
751 | if (m_autoCreateClientStack) | 760 | if (m_autoCreateClientStack) |
752 | { | 761 | { |
753 | clientServer | 762 | clientNetworkServers = m_clientStackManager.CreateServers( |
754 | = m_clientStackManager.CreateServer( | ||
755 | listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource, | 763 | listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource, |
756 | circuitManager); | 764 | circuitManager); |
757 | } | 765 | } |
@@ -766,9 +774,12 @@ namespace OpenSim | |||
766 | 774 | ||
767 | if (m_autoCreateClientStack) | 775 | if (m_autoCreateClientStack) |
768 | { | 776 | { |
769 | clientServer.AddScene(scene); | 777 | foreach (IClientNetworkServer clientnetserver in clientNetworkServers) |
778 | { | ||
779 | clientnetserver.AddScene(scene); | ||
780 | } | ||
770 | } | 781 | } |
771 | 782 | clientServer = clientNetworkServers; | |
772 | scene.LoadWorldMap(); | 783 | scene.LoadWorldMap(); |
773 | 784 | ||
774 | scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName); | 785 | scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName); |
@@ -791,7 +802,7 @@ namespace OpenSim | |||
791 | 802 | ||
792 | return new Scene( | 803 | return new Scene( |
793 | regionInfo, circuitManager, sceneGridService, | 804 | regionInfo, circuitManager, sceneGridService, |
794 | simDataService, estateDataService, false, | 805 | simDataService, estateDataService, |
795 | Config, m_version); | 806 | Config, m_version); |
796 | } | 807 | } |
797 | 808 | ||