* now saves ExternalHostName in config

Sugilite
lbsa71 2007-07-01 16:19:47 +00:00
parent 06a8c13200
commit 7cafe7f6d9
2 changed files with 13 additions and 8 deletions

View File

@ -245,8 +245,7 @@ namespace OpenSim.Framework.Types
int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections"); int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections");
m_internalEndPoint = new IPEndPoint(internalAddress, internalPort); 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) private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
{ {
string addressStr = configData.GetAttribute(attrName); string addressStr = configData.GetAttribute(attrName);

View File

@ -230,12 +230,6 @@ namespace OpenSim
m_udpServer.Add(udpServer); m_udpServer.Add(udpServer);
this.regionData.Add(regionDat); this.regionData.Add(regionDat);
/*
m_log.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL, "Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
m_log.Verbose( "Initialising world");
m_log.componentname = "Region " + regionData.RegionName;
*/
LocalWorld = new Scene(udpServer.PacketServer.ClientAPIs, regionDat, authenBase, commsManager, this.AssetCache, httpServer); LocalWorld = new Scene(udpServer.PacketServer.ClientAPIs, regionDat, authenBase, commsManager, this.AssetCache, httpServer);
this.m_localWorld.Add(LocalWorld); this.m_localWorld.Add(LocalWorld);
//LocalWorld.InventoryCache = InventoryCache; //LocalWorld.InventoryCache = InventoryCache;