* Inserting "SYSTEMIP" into a simconfig.xml's IPAddress="" section will use the first resolved IP of the system. This is to assist with Adam's lazy-deploy system but may be useful to others.
parent
4383a14887
commit
a33f244b58
|
@ -172,9 +172,27 @@ namespace OpenSim
|
||||||
configData.SetAttribute("SimListenAddress", this.IPListenAddr);
|
configData.SetAttribute("SimListenAddress", this.IPListenAddr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// Probably belongs elsewhere, but oh well.
|
||||||
|
if (attri.Trim().StartsWith("SYSTEMIP"))
|
||||||
|
{
|
||||||
|
string localhostname = System.Net.Dns.GetHostName();
|
||||||
|
System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this.IPListenAddr = ips[0].ToString();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.ToString();
|
||||||
|
this.IPListenAddr = "127.0.0.1"; // Use the default if we fail
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
this.IPListenAddr = attri;
|
this.IPListenAddr = attri;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Terrain Default File
|
// Terrain Default File
|
||||||
attri = "";
|
attri = "";
|
||||||
|
|
Loading…
Reference in New Issue