diff options
author | Adam Frisby | 2008-05-02 18:26:19 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-02 18:26:19 +0000 |
commit | 67bbfadc06f36b5175cd5f7268ba876769667dca (patch) | |
tree | bd4f485b5f72ef7a702af067d8656745f0dc3986 /OpenSim/Region/Application/OpenSimMain.cs | |
parent | adding a few more prep parts for this object (diff) | |
download | opensim-SC-67bbfadc06f36b5175cd5f7268ba876769667dca.zip opensim-SC-67bbfadc06f36b5175cd5f7268ba876769667dca.tar.gz opensim-SC-67bbfadc06f36b5175cd5f7268ba876769667dca.tar.bz2 opensim-SC-67bbfadc06f36b5175cd5f7268ba876769667dca.tar.xz |
* More refactorings of UDPServer.
* Removed all references where possible.
* Renamed lots of variables from UDPServerXYZ to clientServerXYZ
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 7924421..5b44813 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -40,7 +40,6 @@ using OpenSim.Framework.Communications.Cache; | |||
40 | using OpenSim.Framework.Servers; | 40 | using OpenSim.Framework.Servers; |
41 | using OpenSim.Framework.Statistics; | 41 | using OpenSim.Framework.Statistics; |
42 | using OpenSim.Region.ClientStack; | 42 | using OpenSim.Region.ClientStack; |
43 | using OpenSim.Region.ClientStack.LindenUDP; | ||
44 | using OpenSim.Region.Communications.Local; | 43 | using OpenSim.Region.Communications.Local; |
45 | using OpenSim.Region.Communications.OGS1; | 44 | using OpenSim.Region.Communications.OGS1; |
46 | using OpenSim.Region.Environment; | 45 | using OpenSim.Region.Environment; |
@@ -106,7 +105,7 @@ namespace OpenSim | |||
106 | get { return m_httpServer; } | 105 | get { return m_httpServer; } |
107 | } | 106 | } |
108 | 107 | ||
109 | public List<IClientNetworkServer> UdpServers | 108 | public List<IClientNetworkServer> ClientServers |
110 | { | 109 | { |
111 | get { return m_clientServers; } | 110 | get { return m_clientServers; } |
112 | } | 111 | } |
@@ -409,12 +408,6 @@ namespace OpenSim | |||
409 | plugin.Initialise(this); | 408 | plugin.Initialise(this); |
410 | m_plugins.Add(plugin); | 409 | m_plugins.Add(plugin); |
411 | } | 410 | } |
412 | |||
413 | // Start UDP servers | ||
414 | //for (int i = 0; i < m_udpServers.Count; i++) | ||
415 | //{ | ||
416 | // m_udpServers[i].ServerListener(); | ||
417 | // } | ||
418 | } | 411 | } |
419 | 412 | ||
420 | protected override void Initialize() | 413 | protected override void Initialize() |
@@ -496,8 +489,8 @@ namespace OpenSim | |||
496 | Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); | 489 | Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); |
497 | } | 490 | } |
498 | 491 | ||
499 | IClientNetworkServer udpServer; | 492 | IClientNetworkServer clientServer; |
500 | Scene scene = SetupScene(regionInfo, proxyOffset, out udpServer, m_permissions); | 493 | Scene scene = SetupScene(regionInfo, proxyOffset, out clientServer, m_permissions); |
501 | 494 | ||
502 | m_log.Info("[MODULES]: Loading Region's modules"); | 495 | m_log.Info("[MODULES]: Loading Region's modules"); |
503 | 496 | ||
@@ -549,9 +542,9 @@ namespace OpenSim | |||
549 | 542 | ||
550 | m_sceneManager.Add(scene); | 543 | m_sceneManager.Add(scene); |
551 | 544 | ||
552 | m_clientServers.Add(udpServer); | 545 | m_clientServers.Add(clientServer); |
553 | m_regionData.Add(regionInfo); | 546 | m_regionData.Add(regionInfo); |
554 | udpServer.Start(); | 547 | clientServer.Start(); |
555 | 548 | ||
556 | if (do_post_init) | 549 | if (do_post_init) |
557 | { | 550 | { |
@@ -561,7 +554,7 @@ namespace OpenSim | |||
561 | } | 554 | } |
562 | } | 555 | } |
563 | 556 | ||
564 | return udpServer; | 557 | return clientServer; |
565 | } | 558 | } |
566 | 559 | ||
567 | protected override StorageManager CreateStorageManager(string connectionstring) | 560 | protected override StorageManager CreateStorageManager(string connectionstring) |
@@ -583,24 +576,23 @@ namespace OpenSim | |||
583 | public void handleRestartRegion(RegionInfo whichRegion) | 576 | public void handleRestartRegion(RegionInfo whichRegion) |
584 | { | 577 | { |
585 | m_log.Error("[OPENSIM MAIN]: Got restart signal from SceneManager"); | 578 | m_log.Error("[OPENSIM MAIN]: Got restart signal from SceneManager"); |
586 | // Shutting down the UDP server | 579 | // Shutting down the client server |
587 | bool foundUDPServer = false; | 580 | bool foundClientServer = false; |
588 | int UDPServerElement = 0; | 581 | int clientServerElement = 0; |
589 | 582 | ||
590 | for (int i = 0; i < m_clientServers.Count; i++) | 583 | for (int i = 0; i < m_clientServers.Count; i++) |
591 | { | 584 | { |
592 | if (m_clientServers[i].HandlesRegion(new Location(whichRegion.RegionHandle))) | 585 | if (m_clientServers[i].HandlesRegion(new Location(whichRegion.RegionHandle))) |
593 | { | 586 | { |
594 | UDPServerElement = i; | 587 | clientServerElement = i; |
595 | foundUDPServer = true; | 588 | foundClientServer = true; |
596 | break; | 589 | break; |
597 | } | 590 | } |
598 | } | 591 | } |
599 | if (foundUDPServer) | 592 | if (foundClientServer) |
600 | { | 593 | { |
601 | // m_udpServers[UDPServerElement].Server.End | 594 | m_clientServers[clientServerElement].Server.Close(); |
602 | m_clientServers[UDPServerElement].Server.Close(); | 595 | m_clientServers.RemoveAt(clientServerElement); |
603 | m_clientServers.RemoveAt(UDPServerElement); | ||
604 | } | 596 | } |
605 | 597 | ||
606 | //Removing the region from the sim's database of regions.. | 598 | //Removing the region from the sim's database of regions.. |
@@ -618,9 +610,6 @@ namespace OpenSim | |||
618 | } | 610 | } |
619 | 611 | ||
620 | CreateRegion(whichRegion, true); | 612 | CreateRegion(whichRegion, true); |
621 | //UDPServer restartingRegion = CreateRegion(whichRegion); | ||
622 | //restartingRegion.ServerListener(); | ||
623 | //m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle); | ||
624 | } | 613 | } |
625 | 614 | ||
626 | # region Setup methods | 615 | # region Setup methods |