diff options
author | lbsa71 | 2007-07-01 16:19:47 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-01 16:19:47 +0000 |
commit | 7cafe7f6d98ddd28af7c9272640c141732d455c8 (patch) | |
tree | 5e83b67e2711372120448f121140a81639adce62 /OpenSim/Framework | |
parent | MAJOR IP RESTRUCTURING (diff) | |
download | opensim-SC-7cafe7f6d98ddd28af7c9272640c141732d455c8.zip opensim-SC-7cafe7f6d98ddd28af7c9272640c141732d455c8.tar.gz opensim-SC-7cafe7f6d98ddd28af7c9272640c141732d455c8.tar.bz2 opensim-SC-7cafe7f6d98ddd28af7c9272640c141732d455c8.tar.xz |
* now saves ExternalHostName in config
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/General/Types/RegionInfo.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index d98dd60..cbd8695 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs | |||
@@ -245,8 +245,7 @@ namespace OpenSim.Framework.Types | |||
245 | int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections"); | 245 | int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections"); |
246 | m_internalEndPoint = new IPEndPoint(internalAddress, internalPort); | 246 | m_internalEndPoint = new IPEndPoint(internalAddress, internalPort); |
247 | 247 | ||
248 | m_externalHostName = MainLog.Instance.CmdPrompt("External Host Name", "localhost"); | 248 | m_externalHostName = GetString(configData, "ExternalHostName", "localhost", "External Host Name"); |
249 | |||
250 | 249 | ||
251 | 250 | ||
252 | 251 | ||
@@ -389,6 +388,18 @@ namespace OpenSim.Framework.Types | |||
389 | 388 | ||
390 | } | 389 | } |
391 | 390 | ||
391 | private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt) | ||
392 | { | ||
393 | string s = configData.GetAttribute(attrName); | ||
394 | |||
395 | if (String.IsNullOrEmpty( s )) | ||
396 | { | ||
397 | s = MainLog.Instance.CmdPrompt(prompt, defaultvalue); | ||
398 | configData.SetAttribute(attrName, s ); | ||
399 | } | ||
400 | return s; | ||
401 | } | ||
402 | |||
392 | private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt) | 403 | private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt) |
393 | { | 404 | { |
394 | string addressStr = configData.GetAttribute(attrName); | 405 | string addressStr = configData.GetAttribute(attrName); |