aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-07-17 19:40:22 +0000
committerAdam Frisby2007-07-17 19:40:22 +0000
commit3a554de6e2350e0c282e3ede3b538fb5c32923c2 (patch)
tree404760237114263ebb9780f22f543d59245153e0
parent* Added quick ping check reply system to OGS1GridServices (diff)
downloadopensim-SC-3a554de6e2350e0c282e3ede3b538fb5c32923c2.zip
opensim-SC-3a554de6e2350e0c282e3ede3b538fb5c32923c2.tar.gz
opensim-SC-3a554de6e2350e0c282e3ede3b538fb5c32923c2.tar.bz2
opensim-SC-3a554de6e2350e0c282e3ede3b538fb5c32923c2.tar.xz
* Applying babblefrog's DNS patches from issue #188
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/Types/RegionInfo.cs5
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs9
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs3
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs2
4 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs
index a216b52..c347918 100644
--- a/OpenSim/Framework/General/Types/RegionInfo.cs
+++ b/OpenSim/Framework/General/Types/RegionInfo.cs
@@ -210,9 +210,10 @@ namespace OpenSim.Framework.Types
210 210
211 this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage"); 211 this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage");
212 212
213 IPAddress internalAddress = GetIPAddress(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections"); 213 string internalAddress = GetString(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections").ToString();
214 int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections"); 214 int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections");
215 m_internalEndPoint = new IPEndPoint(internalAddress, internalPort); 215 IPAddress internalIPAddress = Dns.GetHostByName(internalAddress).AddressList[0];
216 m_internalEndPoint = new IPEndPoint(internalIPAddress, internalPort);
216 217
217 m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name"); 218 m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name");
218 219
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 22bffa0..b3ba4e5 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Net;
31using System.Reflection; 32using System.Reflection;
32using System.Xml; 33using System.Xml;
33using libsecondlife; 34using libsecondlife;
@@ -329,7 +330,7 @@ namespace OpenSim.Grid.GridServer
329 foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours) 330 foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours)
330 { 331 {
331 NeighbourBlock = new Hashtable(); 332 NeighbourBlock = new Hashtable();
332 NeighbourBlock["sim_ip"] = aSim.Value.serverIP.ToString(); 333 NeighbourBlock["sim_ip"] = Dns.GetHostByName(aSim.Value.serverIP.ToString()).AddressList[0].ToString();
333 NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString(); 334 NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString();
334 NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString(); 335 NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString();
335 NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString(); 336 NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString();
@@ -348,7 +349,7 @@ namespace OpenSim.Grid.GridServer
348 neighbour = getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)); 349 neighbour = getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256));
349 350
350 NeighbourBlock = new Hashtable(); 351 NeighbourBlock = new Hashtable();
351 NeighbourBlock["sim_ip"] = neighbour.serverIP; 352 NeighbourBlock["sim_ip"] = Dns.GetHostByName(neighbour.serverIP).AddressList[0].ToString();
352 NeighbourBlock["sim_port"] = neighbour.serverPort.ToString(); 353 NeighbourBlock["sim_port"] = neighbour.serverPort.ToString();
353 NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString(); 354 NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString();
354 NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString(); 355 NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString();
@@ -407,7 +408,7 @@ namespace OpenSim.Grid.GridServer
407 else 408 else
408 { 409 {
409 Console.WriteLine("found region"); 410 Console.WriteLine("found region");
410 responseData["sim_ip"] = simData.serverIP; 411 responseData["sim_ip"] = Dns.GetHostByName(simData.serverIP).AddressList[0].ToString();
411 responseData["sim_port"] = simData.serverPort.ToString(); 412 responseData["sim_port"] = simData.serverPort.ToString();
412 responseData["http_port"] = simData.httpPort.ToString(); 413 responseData["http_port"] = simData.httpPort.ToString();
413 responseData["remoting_port"] = simData.remotingPort.ToString(); 414 responseData["remoting_port"] = simData.remotingPort.ToString();
@@ -567,7 +568,7 @@ namespace OpenSim.Grid.GridServer
567 respstring += "<sim>"; 568 respstring += "<sim>";
568 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>"; 569 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
569 respstring += "<regionname>" + TheSim.regionName + "</regionname>"; 570 respstring += "<regionname>" + TheSim.regionName + "</regionname>";
570 respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>"; 571 respstring += "<sim_ip>" + Dns.GetHostByName(TheSim.serverIP).AddressList[0].ToString() + "</sim_ip>";
571 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>"; 572 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
572 respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>"; 573 respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
573 respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>"; 574 respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index bb7d673..74d2248 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -27,6 +27,7 @@
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Net;
30using Nwc.XmlRpc; 31using Nwc.XmlRpc;
31using OpenSim.Framework.Data; 32using OpenSim.Framework.Data;
32using OpenSim.Framework.UserManagement; 33using OpenSim.Framework.UserManagement;
@@ -59,7 +60,7 @@ namespace OpenSim.Grid.UserServer
59 60
60 // Destination 61 // Destination
61 Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY); 62 Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
62 response.SimAddress = SimInfo.serverIP; 63 response.SimAddress = Dns.GetHostByName(SimInfo.serverIP).AddressList[0].ToString();
63 response.SimPort = (Int32)SimInfo.serverPort; 64 response.SimPort = (Int32)SimInfo.serverPort;
64 response.RegionX = SimInfo.regionLocX; 65 response.RegionX = SimInfo.regionLocX;
65 response.RegionY = SimInfo.regionLocY; 66 response.RegionY = SimInfo.regionLocY;
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 5ddad00..99e2b20 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Communications.OGS1
117 uint regY = Convert.ToUInt32(n["y"]); 117 uint regY = Convert.ToUInt32(n["y"]);
118 if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) 118 if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY))
119 { 119 {
120 string externalIpStr = (string)n["sim_ip"]; 120 string externalIpStr = Dns.GetHostByName((string)n["sim_ip"]).AddressList[0].ToString();
121 uint port = Convert.ToUInt32(n["sim_port"]); 121 uint port = Convert.ToUInt32(n["sim_port"]);
122 string externalUri = (string)n["sim_uri"]; 122 string externalUri = (string)n["sim_uri"];
123 123