diff options
author | lbsa71 | 2007-07-01 16:07:41 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-01 16:07:41 +0000 |
commit | 06a8c132005b4ab804f25d54c0c0f899fc98e3a1 (patch) | |
tree | 2210d9426050c11035453631735fb1f324a070a7 /OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |
parent | Fixed SimpleApp - aka thankgoditssundaycommit (diff) | |
download | opensim-SC_OLD-06a8c132005b4ab804f25d54c0c0f899fc98e3a1.zip opensim-SC_OLD-06a8c132005b4ab804f25d54c0c0f899fc98e3a1.tar.gz opensim-SC_OLD-06a8c132005b4ab804f25d54c0c0f899fc98e3a1.tar.bz2 opensim-SC_OLD-06a8c132005b4ab804f25d54c0c0f899fc98e3a1.tar.xz |
MAJOR IP RESTRUCTURING
* moving towards IPEndPoints all over the place
* trying to make the internal/external division
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1GridServices.cs')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 18 |
1 files changed, 14 insertions, 4 deletions
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 | ||
14 | using Nwc.XmlRpc; | 14 | using Nwc.XmlRpc; |
15 | using libsecondlife; | 15 | using libsecondlife; |
16 | using System.Net; | ||
16 | 17 | ||
17 | namespace OpenSim.Region.Communications.OGS1 | 18 | namespace 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 |