mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
* now saves ExternalHostName in config
This commit is contained in:
@@ -245,8 +245,7 @@ namespace OpenSim.Framework.Types
|
||||
int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections");
|
||||
m_internalEndPoint = new IPEndPoint(internalAddress, internalPort);
|
||||
|
||||
m_externalHostName = MainLog.Instance.CmdPrompt("External Host Name", "localhost");
|
||||
|
||||
m_externalHostName = GetString(configData, "ExternalHostName", "localhost", "External Host Name");
|
||||
|
||||
|
||||
|
||||
@@ -389,6 +388,18 @@ namespace OpenSim.Framework.Types
|
||||
|
||||
}
|
||||
|
||||
private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
|
||||
{
|
||||
string s = configData.GetAttribute(attrName);
|
||||
|
||||
if (String.IsNullOrEmpty( s ))
|
||||
{
|
||||
s = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
|
||||
configData.SetAttribute(attrName, s );
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
|
||||
{
|
||||
string addressStr = configData.GetAttribute(attrName);
|
||||
|
||||
Reference in New Issue
Block a user