aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
diff options
context:
space:
mode:
authorlbsa712007-09-24 23:58:43 +0000
committerlbsa712007-09-24 23:58:43 +0000
commit3ac43d012031cae8189111d96b7350b3e931836c (patch)
tree98d1f6f0f97f02ab060434b369065d14d2ba1cbb /OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
parent* Added time dilation property to Scene (diff)
downloadopensim-SC-3ac43d012031cae8189111d96b7350b3e931836c.zip
opensim-SC-3ac43d012031cae8189111d96b7350b3e931836c.tar.gz
opensim-SC-3ac43d012031cae8189111d96b7350b3e931836c.tar.bz2
opensim-SC-3ac43d012031cae8189111d96b7350b3e931836c.tar.xz
* Removed some more fields from CommunicationsLocal
* added OnLoginToRegion to CommunicationsLocal
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1GridServices.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs22
1 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index dea4b9f..91694b5 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Communications.OGS1
70 70
71 // Send Request 71 // Send Request
72 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); 72 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
73 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); 73 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 10000);
74 Hashtable GridRespData = (Hashtable)GridResp.Value; 74 Hashtable GridRespData = (Hashtable)GridResp.Value;
75 75
76 Hashtable griddatahash = GridRespData; 76 Hashtable griddatahash = GridRespData;
@@ -109,18 +109,20 @@ namespace OpenSim.Region.Communications.OGS1
109 109
110 List<RegionInfo> neighbours = new List<RegionInfo>(); 110 List<RegionInfo> neighbours = new List<RegionInfo>();
111 111
112 foreach (ArrayList a in respData.Values) 112 foreach (ArrayList neighboursList in respData.Values)
113 { 113 {
114 foreach (Hashtable n in a) 114 foreach (Hashtable neighbourData in neighboursList)
115 { 115 {
116 uint regX = Convert.ToUInt32(n["x"]); 116 uint regX = Convert.ToUInt32(neighbourData["x"]);
117 uint regY = Convert.ToUInt32(n["y"]); 117 uint regY = Convert.ToUInt32(neighbourData["y"]);
118 if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) 118 if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY))
119 { 119 {
120 string externalIpStr = OpenSim.Framework.Utilities.Util.GetHostFromDNS((string)n["sim_ip"]).ToString(); 120 string simIp = (string)neighbourData["sim_ip"];
121 uint port = Convert.ToUInt32(n["sim_port"]); 121
122 string externalUri = (string)n["sim_uri"]; 122 uint port = Convert.ToUInt32(neighbourData["sim_port"]);
123 string externalUri = (string)neighbourData["sim_uri"];
123 124
125 string externalIpStr = OpenSim.Framework.Utilities.Util.GetHostFromDNS(simIp).ToString();
124 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port); 126 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port);
125 string neighbourExternalUri = externalUri; 127 string neighbourExternalUri = externalUri;
126 RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr); 128 RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr);
@@ -128,10 +130,10 @@ namespace OpenSim.Region.Communications.OGS1
128 //OGS1 130 //OGS1
129 //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally 131 //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally
130 132
131 neighbour.RegionName = (string)n["name"]; 133 neighbour.RegionName = (string)neighbourData["name"];
132 134
133 //OGS1+ 135 //OGS1+
134 neighbour.SimUUID = (string)n["uuid"]; 136 neighbour.SimUUID = new LLUUID((string) neighbourData["uuid"]);
135 137
136 neighbours.Add(neighbour); 138 neighbours.Add(neighbour);
137 } 139 }