aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
authorAdam Frisby2008-05-02 16:41:08 +0000
committerAdam Frisby2008-05-02 16:41:08 +0000
commit29b8c84ceaaeca80bfa9c0bfc8c31e421e39ef71 (patch)
tree848ce119d9b87bc186c20b08cc604de50a872b31 /OpenSim/Region/Application/OpenSimMain.cs
parent* Refactored ClientView into LLClientView. Removed all direct references to U... (diff)
downloadopensim-SC-29b8c84ceaaeca80bfa9c0bfc8c31e421e39ef71.zip
opensim-SC-29b8c84ceaaeca80bfa9c0bfc8c31e421e39ef71.tar.gz
opensim-SC-29b8c84ceaaeca80bfa9c0bfc8c31e421e39ef71.tar.bz2
opensim-SC-29b8c84ceaaeca80bfa9c0bfc8c31e421e39ef71.tar.xz
* Commit 2/3 - Please dont attempt to update to this revision until all 3 are in.
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs27
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index c4c0eb4..1f67c6a 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -40,6 +40,7 @@ using OpenSim.Framework.Communications.Cache;
40using OpenSim.Framework.Servers; 40using OpenSim.Framework.Servers;
41using OpenSim.Framework.Statistics; 41using OpenSim.Framework.Statistics;
42using OpenSim.Region.ClientStack; 42using OpenSim.Region.ClientStack;
43using OpenSim.Region.ClientStack.LindenUDP;
43using OpenSim.Region.Communications.Local; 44using OpenSim.Region.Communications.Local;
44using OpenSim.Region.Communications.OGS1; 45using OpenSim.Region.Communications.OGS1;
45using OpenSim.Region.Environment; 46using OpenSim.Region.Environment;
@@ -70,7 +71,7 @@ namespace OpenSim
70 71
71 protected string m_storageDll; 72 protected string m_storageDll;
72 73
73 protected List<UDPServer> m_udpServers = new List<UDPServer>(); 74 protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>();
74 protected List<RegionInfo> m_regionData = new List<RegionInfo>(); 75 protected List<RegionInfo> m_regionData = new List<RegionInfo>();
75 76
76 protected bool m_physicalPrim; 77 protected bool m_physicalPrim;
@@ -105,9 +106,9 @@ namespace OpenSim
105 get { return m_httpServer; } 106 get { return m_httpServer; }
106 } 107 }
107 108
108 public List<UDPServer> UdpServers 109 public List<IClientNetworkServer> UdpServers
109 { 110 {
110 get { return m_udpServers; } 111 get { return m_clientServers; }
111 } 112 }
112 113
113 public List<RegionInfo> RegionData 114 public List<RegionInfo> RegionData
@@ -327,7 +328,7 @@ namespace OpenSim
327 328
328 // We are done with startup 329 // We are done with startup
329 m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", 330 m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
330 m_udpServers.Count.ToString(), m_udpServers.Count > 1 ? "s" : ""); 331 m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
331 WorldHasComeToAnEnd.WaitOne(); 332 WorldHasComeToAnEnd.WaitOne();
332 m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye."); 333 m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye.");
333 Environment.Exit(0); 334 Environment.Exit(0);
@@ -452,7 +453,7 @@ namespace OpenSim
452 /// <param name="regionInfo"></param> 453 /// <param name="regionInfo"></param>
453 /// <param name="portadd_flag"></param> 454 /// <param name="portadd_flag"></param>
454 /// <returns></returns> 455 /// <returns></returns>
455 public UDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag) 456 public LLUDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag)
456 { 457 {
457 return CreateRegion(regionInfo, portadd_flag, false); 458 return CreateRegion(regionInfo, portadd_flag, false);
458 } 459 }
@@ -463,7 +464,7 @@ namespace OpenSim
463 /// <param name="regionInfo"></param> 464 /// <param name="regionInfo"></param>
464 /// <param name="portadd_flag"></param> 465 /// <param name="portadd_flag"></param>
465 /// <returns></returns> 466 /// <returns></returns>
466 public UDPServer CreateRegion(RegionInfo regionInfo) 467 public LLUDPServer CreateRegion(RegionInfo regionInfo)
467 { 468 {
468 return CreateRegion(regionInfo, false, true); 469 return CreateRegion(regionInfo, false, true);
469 } 470 }
@@ -475,7 +476,7 @@ namespace OpenSim
475 /// <param name="portadd_flag"></param> 476 /// <param name="portadd_flag"></param>
476 /// <param name="do_post_init"></param> 477 /// <param name="do_post_init"></param>
477 /// <returns></returns> 478 /// <returns></returns>
478 public UDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init) 479 public LLUDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init)
479 { 480 {
480 int port = regionInfo.InternalEndPoint.Port; 481 int port = regionInfo.InternalEndPoint.Port;
481 482
@@ -495,7 +496,7 @@ namespace OpenSim
495 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); 496 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName);
496 } 497 }
497 498
498 UDPServer udpServer; 499 LLUDPServer udpServer;
499 Scene scene = SetupScene(regionInfo, proxyOffset, out udpServer, m_permissions); 500 Scene scene = SetupScene(regionInfo, proxyOffset, out udpServer, m_permissions);
500 501
501 m_log.Info("[MODULES]: Loading Region's modules"); 502 m_log.Info("[MODULES]: Loading Region's modules");
@@ -548,7 +549,7 @@ namespace OpenSim
548 549
549 m_sceneManager.Add(scene); 550 m_sceneManager.Add(scene);
550 551
551 m_udpServers.Add(udpServer); 552 m_clientServers.Add(udpServer);
552 m_regionData.Add(regionInfo); 553 m_regionData.Add(regionInfo);
553 udpServer.ServerListener(); 554 udpServer.ServerListener();
554 555
@@ -586,9 +587,9 @@ namespace OpenSim
586 bool foundUDPServer = false; 587 bool foundUDPServer = false;
587 int UDPServerElement = 0; 588 int UDPServerElement = 0;
588 589
589 for (int i = 0; i < m_udpServers.Count; i++) 590 for (int i = 0; i < m_clientServers.Count; i++)
590 { 591 {
591 if (m_udpServers[i].RegionHandle == whichRegion.RegionHandle) 592 if (m_clientServers[i].HandlesRegion(new Location(whichRegion.RegionHandle)))
592 { 593 {
593 UDPServerElement = i; 594 UDPServerElement = i;
594 foundUDPServer = true; 595 foundUDPServer = true;
@@ -598,8 +599,8 @@ namespace OpenSim
598 if (foundUDPServer) 599 if (foundUDPServer)
599 { 600 {
600 // m_udpServers[UDPServerElement].Server.End 601 // m_udpServers[UDPServerElement].Server.End
601 m_udpServers[UDPServerElement].Server.Close(); 602 m_clientServers[UDPServerElement].Server.Close();
602 m_udpServers.RemoveAt(UDPServerElement); 603 m_clientServers.RemoveAt(UDPServerElement);
603 } 604 }
604 605
605 //Removing the region from the sim's database of regions.. 606 //Removing the region from the sim's database of regions..