aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
authorteravus2013-02-03 07:44:45 -0500
committerteravus2013-02-03 08:13:52 -0500
commit6b0310b82973031fdf35c570bc69450f2f700eb7 (patch)
tree4f9c278e43c7c61935bd8daad2dedf79237971c2 /OpenSim/Region/Application/OpenSimBase.cs
parentSit and Spin reduction. If sitting, slam avatar angular velocity to zero. (diff)
downloadopensim-SC_OLD-6b0310b82973031fdf35c570bc69450f2f700eb7.zip
opensim-SC_OLD-6b0310b82973031fdf35c570bc69450f2f700eb7.tar.gz
opensim-SC_OLD-6b0310b82973031fdf35c570bc69450f2f700eb7.tar.bz2
opensim-SC_OLD-6b0310b82973031fdf35c570bc69450f2f700eb7.tar.xz
Adds the ability to load more then one IClientNetworkServer thereby allowing additional client network servers at the same time. Use comma separated values in clientstack_plugin in your config. Additional plugins lying around shouldn't be picked up because the loader only loads configured dll assemblies and breaks at the first IClientNetworkServer found in the assembly. (the only new functionality is the ability to specify more in config). Note: The existing functionality also passes in a nini config.. and has a boolean to determine if the client network server should be initialized for a specific scene.
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs37
1 files changed, 22 insertions, 15 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index c3c87e7..f5c06df 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -316,7 +316,7 @@ namespace OpenSim
316 /// <param name="regionInfo"></param> 316 /// <param name="regionInfo"></param>
317 /// <param name="portadd_flag"></param> 317 /// <param name="portadd_flag"></param>
318 /// <returns></returns> 318 /// <returns></returns>
319 public IClientNetworkServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, out IScene scene) 319 public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, bool portadd_flag, out IScene scene)
320 { 320 {
321 return CreateRegion(regionInfo, portadd_flag, false, out scene); 321 return CreateRegion(regionInfo, portadd_flag, false, out scene);
322 } 322 }
@@ -326,7 +326,7 @@ namespace OpenSim
326 /// </summary> 326 /// </summary>
327 /// <param name="regionInfo"></param> 327 /// <param name="regionInfo"></param>
328 /// <returns></returns> 328 /// <returns></returns>
329 public IClientNetworkServer CreateRegion(RegionInfo regionInfo, out IScene scene) 329 public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, out IScene scene)
330 { 330 {
331 return CreateRegion(regionInfo, false, true, out scene); 331 return CreateRegion(regionInfo, false, true, out scene);
332 } 332 }
@@ -338,7 +338,7 @@ namespace OpenSim
338 /// <param name="portadd_flag"></param> 338 /// <param name="portadd_flag"></param>
339 /// <param name="do_post_init"></param> 339 /// <param name="do_post_init"></param>
340 /// <returns></returns> 340 /// <returns></returns>
341 public IClientNetworkServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene) 341 public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene)
342 { 342 {
343 int port = regionInfo.InternalEndPoint.Port; 343 int port = regionInfo.InternalEndPoint.Port;
344 344
@@ -363,8 +363,8 @@ namespace OpenSim
363 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); 363 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName);
364 } 364 }
365 365
366 IClientNetworkServer clientServer; 366 List<IClientNetworkServer> clientServers;
367 Scene scene = SetupScene(regionInfo, proxyOffset, Config, out clientServer); 367 Scene scene = SetupScene(regionInfo, proxyOffset, Config, out clientServers);
368 368
369 m_log.Info("[MODULES]: Loading Region's modules (old style)"); 369 m_log.Info("[MODULES]: Loading Region's modules (old style)");
370 370
@@ -414,8 +414,11 @@ namespace OpenSim
414 414
415 if (m_autoCreateClientStack) 415 if (m_autoCreateClientStack)
416 { 416 {
417 m_clientServers.Add(clientServer); 417 foreach (IClientNetworkServer clientserver in clientServers)
418 clientServer.Start(); 418 {
419 m_clientServers.Add(clientserver);
420 clientserver.Start();
421 }
419 } 422 }
420 423
421 scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; 424 scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); };
@@ -425,7 +428,7 @@ namespace OpenSim
425 scene.Start(); 428 scene.Start();
426 scene.StartScripts(); 429 scene.StartScripts();
427 430
428 return clientServer; 431 return clientServers;
429 } 432 }
430 433
431 /// <summary> 434 /// <summary>
@@ -641,7 +644,7 @@ namespace OpenSim
641 /// <param name="regionInfo"></param> 644 /// <param name="regionInfo"></param>
642 /// <param name="clientServer"> </param> 645 /// <param name="clientServer"> </param>
643 /// <returns></returns> 646 /// <returns></returns>
644 protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer) 647 protected Scene SetupScene(RegionInfo regionInfo, out List<IClientNetworkServer> clientServer)
645 { 648 {
646 return SetupScene(regionInfo, 0, null, out clientServer); 649 return SetupScene(regionInfo, 0, null, out clientServer);
647 } 650 }
@@ -655,19 +658,20 @@ namespace OpenSim
655 /// <param name="clientServer"> </param> 658 /// <param name="clientServer"> </param>
656 /// <returns></returns> 659 /// <returns></returns>
657 protected Scene SetupScene( 660 protected Scene SetupScene(
658 RegionInfo regionInfo, int proxyOffset, IConfigSource configSource, out IClientNetworkServer clientServer) 661 RegionInfo regionInfo, int proxyOffset, IConfigSource configSource, out List<IClientNetworkServer> clientServer)
659 { 662 {
663 List<IClientNetworkServer> clientNetworkServers = null;
664
660 AgentCircuitManager circuitManager = new AgentCircuitManager(); 665 AgentCircuitManager circuitManager = new AgentCircuitManager();
661 IPAddress listenIP = regionInfo.InternalEndPoint.Address; 666 IPAddress listenIP = regionInfo.InternalEndPoint.Address;
662 //if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP)) 667 //if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP))
663 // listenIP = IPAddress.Parse("0.0.0.0"); 668 // listenIP = IPAddress.Parse("0.0.0.0");
664 669
665 uint port = (uint) regionInfo.InternalEndPoint.Port; 670 uint port = (uint) regionInfo.InternalEndPoint.Port;
666 671 IClientNetworkServer clientNetworkServer;
667 if (m_autoCreateClientStack) 672 if (m_autoCreateClientStack)
668 { 673 {
669 clientServer 674 clientNetworkServers = m_clientStackManager.CreateServers(
670 = m_clientStackManager.CreateServer(
671 listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource, 675 listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource,
672 circuitManager); 676 circuitManager);
673 } 677 }
@@ -682,9 +686,12 @@ namespace OpenSim
682 686
683 if (m_autoCreateClientStack) 687 if (m_autoCreateClientStack)
684 { 688 {
685 clientServer.AddScene(scene); 689 foreach (IClientNetworkServer clientnetserver in clientNetworkServers)
690 {
691 clientnetserver.AddScene(scene);
692 }
686 } 693 }
687 694 clientServer = clientNetworkServers;
688 scene.LoadWorldMap(); 695 scene.LoadWorldMap();
689 696
690 scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName); 697 scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);