* Applying babblefrog's DNS patches from issue #188
parent
7a88260851
commit
3a554de6e2
|
@ -210,9 +210,10 @@ namespace OpenSim.Framework.Types
|
|||
|
||||
this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage");
|
||||
|
||||
IPAddress internalAddress = GetIPAddress(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections");
|
||||
string internalAddress = GetString(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections").ToString();
|
||||
int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections");
|
||||
m_internalEndPoint = new IPEndPoint(internalAddress, internalPort);
|
||||
IPAddress internalIPAddress = Dns.GetHostByName(internalAddress).AddressList[0];
|
||||
m_internalEndPoint = new IPEndPoint(internalIPAddress, internalPort);
|
||||
|
||||
m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name");
|
||||
|
||||
|
|
|
@ -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<ulong, SimProfileData> 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 += "<sim>";
|
||||
respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
|
||||
respstring += "<regionname>" + TheSim.regionName + "</regionname>";
|
||||
respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>";
|
||||
respstring += "<sim_ip>" + Dns.GetHostByName(TheSim.serverIP).AddressList[0].ToString() + "</sim_ip>";
|
||||
respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
|
||||
respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
|
||||
respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Net;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenSim.Framework.Data;
|
||||
using OpenSim.Framework.UserManagement;
|
||||
|
@ -59,7 +60,7 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
// Destination
|
||||
Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
|
||||
response.SimAddress = SimInfo.serverIP;
|
||||
response.SimAddress = Dns.GetHostByName(SimInfo.serverIP).AddressList[0].ToString();
|
||||
response.SimPort = (Int32)SimInfo.serverPort;
|
||||
response.RegionX = SimInfo.regionLocX;
|
||||
response.RegionY = SimInfo.regionLocY;
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
uint regY = Convert.ToUInt32(n["y"]);
|
||||
if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY))
|
||||
{
|
||||
string externalIpStr = (string)n["sim_ip"];
|
||||
string externalIpStr = Dns.GetHostByName((string)n["sim_ip"]).AddressList[0].ToString();
|
||||
uint port = Convert.ToUInt32(n["sim_port"]);
|
||||
string externalUri = (string)n["sim_uri"];
|
||||
|
||||
|
|
Loading…
Reference in New Issue