aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
diff options
context:
space:
mode:
authorlbsa712009-03-10 09:05:06 +0000
committerlbsa712009-03-10 09:05:06 +0000
commit1b34b94331ca810ed53669699abcff3a6a99de83 (patch)
tree9a4f1c55c287f733b373a46c5a9aa44c0932f5bf /OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
parentFrom: Alan Webb <alan_webb@us.ibm.com> (diff)
downloadopensim-SC_OLD-1b34b94331ca810ed53669699abcff3a6a99de83.zip
opensim-SC_OLD-1b34b94331ca810ed53669699abcff3a6a99de83.tar.gz
opensim-SC_OLD-1b34b94331ca810ed53669699abcff3a6a99de83.tar.bz2
opensim-SC_OLD-1b34b94331ca810ed53669699abcff3a6a99de83.tar.xz
* Refactored out Create() methods to ensure proper transformation between RegionProfileData and RegionInfo
* Created ToRegionInfo method, still not using it pending peer review. * This is a preparatory commit for a subsequent login service refactoring.
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1GridServices.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs24
1 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 5f00f15..1a72f31 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -405,24 +405,22 @@ namespace OpenSim.Region.Communications.OGS1
405 uint regX = Convert.ToUInt32((string) responseData["region_locx"]); 405 uint regX = Convert.ToUInt32((string) responseData["region_locx"]);
406 uint regY = Convert.ToUInt32((string) responseData["region_locy"]); 406 uint regY = Convert.ToUInt32((string) responseData["region_locy"]);
407 string externalHostName = (string) responseData["sim_ip"]; 407 string externalHostName = (string) responseData["sim_ip"];
408 uint port = Convert.ToUInt32(responseData["sim_port"]); 408 uint simPort = Convert.ToUInt32(responseData["sim_port"]);
409 // string externalUri = (string) responseData["sim_uri"]; 409 string regionName = (string)responseData["region_name"];
410 410 UUID regionID = new UUID((string)responseData["region_UUID"]);
411 //IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port); 411 uint remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
412 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)port);
413 412
414 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName); 413 uint httpPort = 9000;
415
416 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
417 regionInfo.RemotingAddress = externalHostName;
418
419 if (responseData.ContainsKey("http_port")) 414 if (responseData.ContainsKey("http_port"))
420 { 415 {
421 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); 416 httpPort = Convert.ToUInt32((string)responseData["http_port"]);
422 } 417 }
423 418
424 regionInfo.RegionID = new UUID((string) responseData["region_UUID"]); 419
425 regionInfo.RegionName = (string) responseData["region_name"]; 420 // string externalUri = (string) responseData["sim_uri"];
421
422 //IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port);
423 regionInfo = RegionInfo.Create(regionID, regionName, regX, regY, externalHostName, httpPort, simPort, remotingPort);
426 424
427 lock (m_remoteRegionInfoCache) 425 lock (m_remoteRegionInfoCache)
428 { 426 {