From 3a554de6e2350e0c282e3ede3b538fb5c32923c2 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 17 Jul 2007 19:40:22 +0000 Subject: * Applying babblefrog's DNS patches from issue #188 --- OpenSim/Grid/GridServer/GridManager.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim/Grid/GridServer') 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 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Net; using System.Reflection; using System.Xml; using libsecondlife; @@ -329,7 +330,7 @@ namespace OpenSim.Grid.GridServer foreach (KeyValuePair aSim in neighbours) { NeighbourBlock = new Hashtable(); - NeighbourBlock["sim_ip"] = aSim.Value.serverIP.ToString(); + NeighbourBlock["sim_ip"] = Dns.GetHostByName(aSim.Value.serverIP.ToString()).AddressList[0].ToString(); NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString(); NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString(); NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString(); @@ -348,7 +349,7 @@ namespace OpenSim.Grid.GridServer neighbour = getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)); NeighbourBlock = new Hashtable(); - NeighbourBlock["sim_ip"] = neighbour.serverIP; + NeighbourBlock["sim_ip"] = Dns.GetHostByName(neighbour.serverIP).AddressList[0].ToString(); NeighbourBlock["sim_port"] = neighbour.serverPort.ToString(); NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString(); NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString(); @@ -407,7 +408,7 @@ namespace OpenSim.Grid.GridServer else { Console.WriteLine("found region"); - responseData["sim_ip"] = simData.serverIP; + responseData["sim_ip"] = Dns.GetHostByName(simData.serverIP).AddressList[0].ToString(); responseData["sim_port"] = simData.serverPort.ToString(); responseData["http_port"] = simData.httpPort.ToString(); responseData["remoting_port"] = simData.remotingPort.ToString(); @@ -567,7 +568,7 @@ namespace OpenSim.Grid.GridServer respstring += ""; respstring += "" + TheSim.UUID.ToString() + ""; respstring += "" + TheSim.regionName + ""; - respstring += "" + TheSim.serverIP + ""; + respstring += "" + Dns.GetHostByName(TheSim.serverIP).AddressList[0].ToString() + ""; respstring += "" + TheSim.serverPort.ToString() + ""; respstring += "" + TheSim.regionLocX.ToString() + ""; respstring += "" + TheSim.regionLocY.ToString() + ""; -- cgit v1.1