aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2016-12-12 10:08:31 +0000
committerMelanie Thielker2016-12-12 10:08:31 +0000
commit9ef9dde0f3ea9185bb9aca03d173e5312e1ba308 (patch)
tree57e215fdfbb79314427dbaab438123d4f0b909bd /OpenSim/Framework
parentApplying a modified version of TomTheDragon's patch to prevent the sim (diff)
downloadopensim-SC-9ef9dde0f3ea9185bb9aca03d173e5312e1ba308.zip
opensim-SC-9ef9dde0f3ea9185bb9aca03d173e5312e1ba308.tar.gz
opensim-SC-9ef9dde0f3ea9185bb9aca03d173e5312e1ba308.tar.bz2
opensim-SC-9ef9dde0f3ea9185bb9aca03d173e5312e1ba308.tar.xz
Make resolving the IP on startup optional.
Adds ResolveAddress boolean to regions.ini
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/RegionInfo.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index f764a34..d7a51ec 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -147,6 +147,7 @@ namespace OpenSim.Framework
147 public string RemotingAddress; 147 public string RemotingAddress;
148 public UUID ScopeID = UUID.Zero; 148 public UUID ScopeID = UUID.Zero;
149 private UUID m_maptileStaticUUID = UUID.Zero; 149 private UUID m_maptileStaticUUID = UUID.Zero;
150 private bool m_resolveAddress = false;
150 151
151 public uint WorldLocX = 0; 152 public uint WorldLocX = 0;
152 public uint WorldLocY = 0; 153 public uint WorldLocY = 0;
@@ -686,6 +687,20 @@ namespace OpenSim.Framework
686 config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString()); 687 config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString());
687 } 688 }
688 689
690 // ResolveAddress
691 //
692 allKeys.Remove("ResolveAddress");
693 if (config.Contains("ResolveAddress"))
694 {
695 m_resolveAddress = config.GetBoolean("ResolveAddress", false);
696 }
697 else
698 {
699 m_resolveAddress = Convert.ToBoolean(MainConsole.Instance.CmdPrompt("Resolve hostname to IP on start (for running inside Docker)", "False"));
700
701 config.Set("ResolveAddress", m_resolveAddress.ToString());
702 }
703
689 // ExternalHostName 704 // ExternalHostName
690 // 705 //
691 allKeys.Remove("ExternalHostName"); 706 allKeys.Remove("ExternalHostName");
@@ -706,6 +721,10 @@ namespace OpenSim.Framework
706 "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", 721 "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
707 m_externalHostName, name); 722 m_externalHostName, name);
708 } 723 }
724 else if (!m_resolveAddress)
725 {
726 m_externalHostName = externalName;
727 }
709 else 728 else
710 { 729 {
711 IPAddress[] addrs = Dns.GetHostAddresses(externalName); 730 IPAddress[] addrs = Dns.GetHostAddresses(externalName);