Fixed DNS resolve bug for Grid mode on multi-Homer systems.
parent
6ca6c035e7
commit
5ade01bb49
|
@ -164,6 +164,7 @@ namespace OpenSim.Framework.Data
|
||||||
ArrayList SendParams = new ArrayList();
|
ArrayList SendParams = new ArrayList();
|
||||||
SendParams.Add(requestData);
|
SendParams.Add(requestData);
|
||||||
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
|
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
|
||||||
|
Console.WriteLine("Requesting response from GridServer URL: " + gridserver_url);
|
||||||
XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000);
|
XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000);
|
||||||
|
|
||||||
Hashtable responseData = (Hashtable)GridResp.Value;
|
Hashtable responseData = (Hashtable)GridResp.Value;
|
||||||
|
|
|
@ -249,6 +249,13 @@ namespace OpenSim.Framework.Utilities
|
||||||
/// <returns>An IP address, or null</returns>
|
/// <returns>An IP address, or null</returns>
|
||||||
public static IPAddress GetHostFromDNS(string dnsAddress)
|
public static IPAddress GetHostFromDNS(string dnsAddress)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Is it already a valid IP? No need to look it up.
|
||||||
|
IPAddress ipa;
|
||||||
|
if (IPAddress.TryParse(dnsAddress, out ipa))
|
||||||
|
return ipa;
|
||||||
|
|
||||||
|
// Not an IP, lookup required
|
||||||
IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList;
|
IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList;
|
||||||
|
|
||||||
foreach (IPAddress host in hosts)
|
foreach (IPAddress host in hosts)
|
||||||
|
|
Loading…
Reference in New Issue