aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications')
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs6
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs18
2 files changed, 17 insertions, 7 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index 5a2a5c8..db9d9b9 100644
--- a/OpenSim/Region/Communications/Local/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -88,11 +88,11 @@ namespace OpenSim.Region.Communications.Local
88 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 88 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
89 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; 89 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
90 string capsPath = Util.GetRandomCapsPath(); 90 string capsPath = Util.GetRandomCapsPath();
91 response.SimAddress = reg.CommsExternalAddress; 91 response.SimAddress = reg.ExternalEndPoint.Address.ToString();
92 response.SimPort = (Int32)reg.CommsIPListenPort; 92 response.SimPort = (Int32)reg.ExternalEndPoint.Port;
93 response.RegionX = reg.RegionLocX ; 93 response.RegionX = reg.RegionLocX ;
94 response.RegionY = reg.RegionLocY ; 94 response.RegionY = reg.RegionLocY ;
95 response.SeedCapability = "http://" + reg.CommsIPListenAddr + ":" + "9000" + "/CAPS/" + capsPath + "0000/"; 95 response.SeedCapability = "http://" + reg.ExternalHostName + ":" + reg.ExternalEndPoint.Port.ToString() + "/CAPS/" + capsPath + "0000/";
96 theUser.currentAgent.currentRegion = reg.SimUUID; 96 theUser.currentAgent.currentRegion = reg.SimUUID;
97 theUser.currentAgent.currentHandle = reg.RegionHandle; 97 theUser.currentAgent.currentHandle = reg.RegionHandle;
98 98
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 2ac7297..977b131 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -13,6 +13,7 @@ using OpenSim.Framework.Communications;
13 13
14using Nwc.XmlRpc; 14using Nwc.XmlRpc;
15using libsecondlife; 15using libsecondlife;
16using System.Net;
16 17
17namespace OpenSim.Region.Communications.OGS1 18namespace OpenSim.Region.Communications.OGS1
18{ 19{
@@ -32,13 +33,15 @@ namespace OpenSim.Region.Communications.OGS1
32 // Login / Authentication 33 // Login / Authentication
33 GridParams["authkey"] = gridInfo.GridServerSendKey; 34 GridParams["authkey"] = gridInfo.GridServerSendKey;
34 GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); 35 GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated();
35 GridParams["sim_ip"] = regionInfo.CommsExternalAddress; 36 GridParams["sim_ip"] = regionInfo.InternalEndPoint.Address.ToString();
36 GridParams["sim_port"] = regionInfo.CommsIPListenPort.ToString(); 37 GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString();
37 38
38 // Package into an XMLRPC Request 39 // Package into an XMLRPC Request
39 ArrayList SendParams = new ArrayList(); 40 ArrayList SendParams = new ArrayList();
40 SendParams.Add(GridParams); 41 SendParams.Add(GridParams);
41 42
43
44
42 // Send Request 45 // Send Request
43 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); 46 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
44 XmlRpcResponse GridResp = GridReq.Send(gridInfo.GridServerURI, 3000); 47 XmlRpcResponse GridResp = GridReq.Send(gridInfo.GridServerURI, 3000);
@@ -56,7 +59,7 @@ namespace OpenSim.Region.Communications.OGS1
56 if (!this.listeners.ContainsKey(regionInfo.RegionHandle)) 59 if (!this.listeners.ContainsKey(regionInfo.RegionHandle))
57 { 60 {
58 // initialised = true; 61 // initialised = true;
59 httpListener = new BaseHttpServer(regionInfo.CommsIPListenPort); 62 httpListener = new BaseHttpServer( regionInfo.InternalEndPoint.Port );
60 httpListener.AddXmlRPCHandler("expect_user", this.ExpectUser); 63 httpListener.AddXmlRPCHandler("expect_user", this.ExpectUser);
61 httpListener.Start(); 64 httpListener.Start();
62 } 65 }
@@ -75,7 +78,14 @@ namespace OpenSim.Region.Communications.OGS1
75 78
76 foreach (Hashtable n in (Hashtable)respData.Values) 79 foreach (Hashtable n in (Hashtable)respData.Values)
77 { 80 {
78 RegionInfo neighbour = new RegionInfo( (uint)n["x"], (uint)n["y"], (string)n["sim_ip"], (int)n["sim_port"], (string)n["sim_uri"] ); 81 string internalIpStr = (string)n["sim_ip"];
82 int port = (int)n["sim_port"];
83 string externalUri = (string)n["sim_uri"];
84
85 IPEndPoint neighbourInternalEndPoint = new IPEndPoint( IPAddress.Parse( internalIpStr ), port);
86 string neighbourExternalUri = externalUri;
87
88 RegionInfo neighbour = new RegionInfo((uint)n["x"], (uint)n["y"], neighbourInternalEndPoint, neighbourExternalUri );
79 89
80 //OGS1 90 //OGS1
81 //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally 91 //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally