aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/3Di
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs22
-rw-r--r--ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs2
2 files changed, 11 insertions, 13 deletions
diff --git a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs
index 668b413..9bccc0b 100644
--- a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs
+++ b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs
@@ -39,7 +39,6 @@ using Mono.Addins;
39using Nwc.XmlRpc; 39using Nwc.XmlRpc;
40using OpenSim.Framework; 40using OpenSim.Framework;
41using OpenSim.Framework.Servers; 41using OpenSim.Framework.Servers;
42//using OpenSim.Region.ClientStack.LindenUDP;
43using OpenSim.Region.ClientStack; 42using OpenSim.Region.ClientStack;
44using OpenSim.Region.ClientStack.LindenUDP; 43using OpenSim.Region.ClientStack.LindenUDP;
45using OpenSim.Region.Environment.Scenes; 44using OpenSim.Region.Environment.Scenes;
@@ -88,7 +87,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
88 AsynchronousSocketListener.PacketHandler = new AsynchronousSocketListener.PacketRecieveHandler(SynchronizePacketRecieve); 87 AsynchronousSocketListener.PacketHandler = new AsynchronousSocketListener.PacketRecieveHandler(SynchronizePacketRecieve);
89 88
90 sceneManager = openSim.SceneManager; 89 sceneManager = openSim.SceneManager;
91 m_clientServers = openSim.UdpServers; 90 m_clientServers = openSim.ClientServers;
92 regionData = openSim.RegionData; 91 regionData = openSim.RegionData;
93 simMain = openSim; 92 simMain = openSim;
94 commandServer = openSim.HttpServer; 93 commandServer = openSim.HttpServer;
@@ -390,7 +389,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
390 return result; 389 return result;
391 } 390 }
392 391
393 private IClientNetworkServer SearchUDPServerFromPortNum(int portnum) 392 private IClientNetworkServer SearchClientServerFromPortNum(int portnum)
394 { 393 {
395 return m_clientServers.Find(delegate(IClientNetworkServer server) { return (portnum + proxyOffset == ((IPEndPoint)server.Server.LocalEndPoint).Port); }); 394 return m_clientServers.Find(delegate(IClientNetworkServer server) { return (portnum + proxyOffset == ((IPEndPoint)server.Server.LocalEndPoint).Port); });
396 } 395 }
@@ -522,12 +521,11 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
522 Scene scene = null; 521 Scene scene = null;
523 string[] files = null; 522 string[] files = null;
524 IClientAPI controller = null; 523 IClientAPI controller = null;
525 IClientNetworkServer udpserv = null; 524 IClientNetworkServer clientserv = null;
526 525
527 if (sceneManager.TryGetScene(dst_region.RegionID, out scene)) 526 if (sceneManager.TryGetScene(dst_region.RegionID, out scene))
528 { 527 {
529 // search udpserver 528 clientserv = SearchClientServerFromPortNum(scene.RegionInfo.InternalEndPoint.Port);
530 udpserv = SearchUDPServerFromPortNum(scene.RegionInfo.InternalEndPoint.Port);
531 529
532 // restore the scene presence 530 // restore the scene presence
533 for (int i = 0;; i++) 531 for (int i = 0;; i++)
@@ -565,9 +563,9 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
565 563
566 // BUG: Will only work with LLUDPServer. 564 // BUG: Will only work with LLUDPServer.
567 // TODO: This needs to be abstracted and converted into IClientNetworkServer 565 // TODO: This needs to be abstracted and converted into IClientNetworkServer
568 if (udpserv is LLUDPServer) 566 if (clientserv is LLUDPServer)
569 { 567 {
570 ((LLUDPServer) udpserv).RestoreClient(agentdata, data.userEP, data.proxyEP); 568 ((LLUDPServer) clientserv).RestoreClient(agentdata, data.userEP, data.proxyEP);
571 } 569 }
572 570
573 // waiting for the scene-presense restored 571 // waiting for the scene-presense restored
@@ -627,12 +625,12 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
627 } 625 }
628 626
629 // Shutting down the UDP server 627 // Shutting down the UDP server
630 IClientNetworkServer udpsvr = SearchUDPServerFromPortNum(port); 628 IClientNetworkServer clientsvr = SearchClientServerFromPortNum(port);
631 629
632 if (udpsvr != null) 630 if (clientsvr != null)
633 { 631 {
634 udpsvr.Server.Close(); 632 clientsvr.Server.Close();
635 m_clientServers.Remove(udpsvr); 633 m_clientServers.Remove(clientsvr);
636 } 634 }
637 } 635 }
638 636
diff --git a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs
index eaafe6c..e8ae8a9 100644
--- a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs
+++ b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs
@@ -295,7 +295,7 @@ namespace OpenSim.ApplicationPlugins.RegionProxy
295 295
296 try 296 try
297 { 297 {
298 m_log.InfoFormat("[PROXY] Opening UDP socket on {0}", sd.clientEP); 298 m_log.InfoFormat("[PROXY] Opening special UDP socket on {0}", sd.clientEP);
299 sd.serverIP = new IPEndPoint(IPAddress.Parse("0.0.0.0"), ((IPEndPoint) sd.clientEP).Port); 299 sd.serverIP = new IPEndPoint(IPAddress.Parse("0.0.0.0"), ((IPEndPoint) sd.clientEP).Port);
300 sd.server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 300 sd.server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
301 sd.server.Bind(sd.serverIP); 301 sd.server.Bind(sd.serverIP);