* Added patch for SYSTEMIP handling when an IPv6 address is the primary address of the system. (as is the case on Windows Vista)

Sugilite
Adam Frisby 2007-06-27 08:47:57 +00:00
parent a1e6fff14f
commit 6a0d4667ea
1 changed files with 10 additions and 1 deletions

View File

@ -177,7 +177,16 @@ namespace OpenSim.Framework.Types
System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname);
try
{
this.CommsIPListenAddr = ips[0].ToString();
this.CommsIPListenAddr = "0.0.0.0"; // Incase a IPv4 address isnt found
foreach (System.Net.IPAddress ip in ips)
{
if (ip.AddressFamily.ToString() == System.Net.Sockets.ProtocolFamily.InterNetwork.ToString())
{
this.CommsIPListenAddr = ip.ToString();
break;
}
}
}
catch (Exception e)
{