diff options
Diffstat (limited to '')
-rw-r--r-- | ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs index 325385a..b552d62 100644 --- a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs +++ b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs | |||
@@ -296,7 +296,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
296 | return; | 296 | return; |
297 | } | 297 | } |
298 | 298 | ||
299 | simMain.ProxyCommand(src_region.proxyUrl, "BlockClientMessages", src_url, src_port + proxyOffset); | 299 | Util.XmlRpcCommand(src_region.proxyUrl, "BlockClientMessages", src_url, src_port + proxyOffset); |
300 | 300 | ||
301 | // serialization of origin region's data | 301 | // serialization of origin region's data |
302 | SerializeRegion(src_region, serializeDir); | 302 | SerializeRegion(src_region, serializeDir); |
@@ -313,8 +313,8 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
313 | // import the source region's data | 313 | // import the source region's data |
314 | dst_region = DeserializeRegion(dst_port, true, serializeDir); | 314 | dst_region = DeserializeRegion(dst_port, true, serializeDir); |
315 | 315 | ||
316 | simMain.ProxyCommand(dst_region.proxyUrl, "ChangeRegion", src_port + proxyOffset, src_url, dst_port + proxyOffset, dst_url); | 316 | Util.XmlRpcCommand(dst_region.proxyUrl, "ChangeRegion", src_port + proxyOffset, src_url, dst_port + proxyOffset, dst_url); |
317 | simMain.ProxyCommand(dst_region.proxyUrl, "UnblockClientMessages", dst_url, dst_port + proxyOffset); | 317 | Util.XmlRpcCommand(dst_region.proxyUrl, "UnblockClientMessages", dst_url, dst_port + proxyOffset); |
318 | } | 318 | } |
319 | 319 | ||
320 | private void DeserializeRegion_Clone(int src_port, int dst_port, string src_url, string dst_url) | 320 | private void DeserializeRegion_Clone(int src_port, int dst_port, string src_url, string dst_url) |
@@ -331,11 +331,11 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
331 | // Decide who is in charge for each section | 331 | // Decide who is in charge for each section |
332 | int[] port = new int[] { src_port, dst_port }; | 332 | int[] port = new int[] { src_port, dst_port }; |
333 | string[] url = new string[] { "http://" + src_url + ":" + commandServer.Port, "http://" + dst_url + ":" + commandServer.Port }; | 333 | string[] url = new string[] { "http://" + src_url + ":" + commandServer.Port, "http://" + dst_url + ":" + commandServer.Port }; |
334 | for(int i=0; i<2; i++) simMain.XmlRpcCommand(url[i], "SplitRegion", i, 2, port[0], port[1], url[0], url[1]); | 334 | for(int i=0; i<2; i++) Util.XmlRpcCommand(url[i], "SplitRegion", i, 2, port[0], port[1], url[0], url[1]); |
335 | 335 | ||
336 | // Enable the proxy | 336 | // Enable the proxy |
337 | simMain.ProxyCommand(dst_region.proxyUrl, "AddRegion", src_port + proxyOffset, src_url, dst_port + proxyOffset, dst_url); | 337 | Util.XmlRpcCommand(dst_region.proxyUrl, "AddRegion", src_port + proxyOffset, src_url, dst_port + proxyOffset, dst_url); |
338 | simMain.ProxyCommand(dst_region.proxyUrl, "UnblockClientMessages", dst_url, dst_port + proxyOffset); | 338 | Util.XmlRpcCommand(dst_region.proxyUrl, "UnblockClientMessages", dst_url, dst_port + proxyOffset); |
339 | } | 339 | } |
340 | 340 | ||
341 | private void TerminateRegion(object param) | 341 | private void TerminateRegion(object param) |
@@ -758,7 +758,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
758 | ++i; | 758 | ++i; |
759 | } | 759 | } |
760 | } | 760 | } |
761 | 761 | ||
762 | scene.splitID = myID; | 762 | scene.splitID = myID; |
763 | scene.SynchronizeScene = new Scene.SynchronizeSceneHandler(SynchronizeScenes); | 763 | scene.SynchronizeScene = new Scene.SynchronizeSceneHandler(SynchronizeScenes); |
764 | isSplit = true; | 764 | isSplit = true; |
@@ -789,7 +789,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
789 | 789 | ||
790 | RegionInfo region = SearchRegionFromPortNum(src_port); | 790 | RegionInfo region = SearchRegionFromPortNum(src_port); |
791 | 791 | ||
792 | simMain.ProxyCommand(region.proxyUrl, "BlockClientMessages", src_url, src_port + proxyOffset); | 792 | Util.XmlRpcCommand(region.proxyUrl, "BlockClientMessages", src_url, src_port + proxyOffset); |
793 | 793 | ||
794 | Scene scene; | 794 | Scene scene; |
795 | if (sceneManager.TryGetScene(region.RegionID, out scene)) | 795 | if (sceneManager.TryGetScene(region.RegionID, out scene)) |
@@ -815,12 +815,12 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
815 | for(int i=1; i<sceneURL.Length; i++) | 815 | for(int i=1; i<sceneURL.Length; i++) |
816 | { | 816 | { |
817 | string url = (sceneURL[i].Split('/')[2]).Split(':')[0]; // get URL part from EP | 817 | string url = (sceneURL[i].Split('/')[2]).Split(':')[0]; // get URL part from EP |
818 | simMain.ProxyCommand(region.proxyUrl, "DeleteRegion", regionPortList[i] + proxyOffset, url); | 818 | Util.XmlRpcCommand(region.proxyUrl, "DeleteRegion", regionPortList[i] + proxyOffset, url); |
819 | Thread.Sleep(1000); | 819 | Thread.Sleep(1000); |
820 | simMain.XmlRpcCommand(sceneURL[i], "TerminateRegion", regionPortList[i]); // TODO: need + proxyOffset? | 820 | Util.XmlRpcCommand(sceneURL[i], "TerminateRegion", regionPortList[i]); // TODO: need + proxyOffset? |
821 | } | 821 | } |
822 | 822 | ||
823 | simMain.ProxyCommand(region.proxyUrl, "UnblockClientMessages", src_url, src_port + proxyOffset); | 823 | Util.XmlRpcCommand(region.proxyUrl, "UnblockClientMessages", src_url, src_port + proxyOffset); |
824 | } | 824 | } |
825 | catch (Exception e) | 825 | catch (Exception e) |
826 | { | 826 | { |
@@ -922,10 +922,10 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
922 | // pre.Velocity.ToString(), pre.PhysicsActor.Flying); | 922 | // pre.Velocity.ToString(), pre.PhysicsActor.Flying); |
923 | 923 | ||
924 | 924 | ||
925 | simMain.XmlRpcCommand(sceneURL[i], "UpdatePhysics", | 925 | Util.XmlRpcCommand(sceneURL[i], "UpdatePhysics", |
926 | regionPortList[i], pre.UUID.GetBytes(), | 926 | regionPortList[i], pre.UUID.GetBytes(), |
927 | pre.AbsolutePosition.GetBytes(), pre.Velocity.GetBytes(), | 927 | pre.AbsolutePosition.GetBytes(), pre.Velocity.GetBytes(), |
928 | pre.PhysicsActor.Flying); | 928 | pre.PhysicsActor.Flying); |
929 | 929 | ||
930 | /* | 930 | /* |
931 | byte[] buff = new byte[12+12+1]; | 931 | byte[] buff = new byte[12+12+1]; |