mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
removed some duplicate hard-coded port numbers. changed ports to uint.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Capabilities
|
||||
public class Caps
|
||||
{
|
||||
private string m_httpListenerHostName;
|
||||
private int m_httpListenPort;
|
||||
private uint m_httpListenPort;
|
||||
private string m_capsObjectPath = "00001-";
|
||||
private string m_requestPath = "0000/";
|
||||
private string m_mapLayerPath = "0001/";
|
||||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Capabilities
|
||||
public NewInventoryItem AddNewInventoryItem = null;
|
||||
public ItemUpdatedCallback ItemUpdatedCall = null;
|
||||
|
||||
public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, int httpPort, string capsPath,
|
||||
public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
|
||||
LLUUID agent, bool dumpAssetsToFile)
|
||||
{
|
||||
m_assetCache = assetCache;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace OpenSim.Framework.UserManagement
|
||||
private string gendered;
|
||||
private string everLoggedIn;
|
||||
private string login;
|
||||
private int simPort;
|
||||
private uint simPort;
|
||||
private string simAddress;
|
||||
private string agentAccess;
|
||||
private Int32 circuitCode;
|
||||
@@ -369,7 +369,7 @@ namespace OpenSim.Framework.UserManagement
|
||||
set { everLoggedIn = value; }
|
||||
} // EverLoggedIn
|
||||
|
||||
public int SimPort
|
||||
public uint SimPort
|
||||
{
|
||||
get { return simPort; }
|
||||
set { simPort = value; }
|
||||
|
||||
@@ -345,15 +345,15 @@ namespace OpenSim.Framework.Console
|
||||
return address;
|
||||
}
|
||||
|
||||
public int CmdPromptIPPort(string prompt, string defaultvalue)
|
||||
public uint CmdPromptIPPort(string prompt, string defaultvalue)
|
||||
{
|
||||
int port;
|
||||
uint port;
|
||||
string portStr;
|
||||
|
||||
while (true)
|
||||
{
|
||||
portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
|
||||
if (int.TryParse(portStr, out port))
|
||||
if (uint.TryParse(portStr, out port))
|
||||
{
|
||||
if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace OpenSim.Framework
|
||||
public string DatabaseProvider = "";
|
||||
public static uint DefaultHttpPort = 8004;
|
||||
|
||||
public int HttpPort = 8004;
|
||||
public uint HttpPort = DefaultHttpPort;
|
||||
|
||||
private ConfigurationMember configMember;
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace OpenSim.Framework
|
||||
DatabaseProvider = (string) configuration_result;
|
||||
break;
|
||||
case "http_port":
|
||||
HttpPort = (int) configuration_result;
|
||||
HttpPort = (uint) configuration_result;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace OpenSim.Framework
|
||||
|
||||
public string InventoryURL = "";
|
||||
|
||||
public static int DefaultHttpListenerPort = 9000;
|
||||
public int HttpListenerPort = DefaultHttpListenerPort;
|
||||
public static uint DefaultHttpListenerPort = 9000;
|
||||
public uint HttpListenerPort = DefaultHttpListenerPort;
|
||||
|
||||
public static int RemotingListenerPort = 8895;
|
||||
public static uint RemotingListenerPort = 8895;
|
||||
|
||||
|
||||
public NetworkServersInfo()
|
||||
@@ -80,8 +80,8 @@ namespace OpenSim.Framework
|
||||
m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000);
|
||||
m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000);
|
||||
|
||||
HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort);
|
||||
RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort);
|
||||
HttpListenerPort = (uint) config.Configs["Network"].GetInt("http_listener_port", (int) DefaultHttpListenerPort);
|
||||
RemotingListenerPort = (uint) config.Configs["Network"].GetInt("remoting_listener_port", (int) RemotingListenerPort);
|
||||
GridURL =
|
||||
config.Configs["Network"].GetString("grid_server_url",
|
||||
"http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString());
|
||||
|
||||
@@ -56,15 +56,14 @@ namespace OpenSim.Framework
|
||||
m_externalHostName = externalUri;
|
||||
}
|
||||
|
||||
public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port)
|
||||
public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port)
|
||||
{
|
||||
|
||||
m_regionLocX = regionLocX;
|
||||
m_regionLocY = regionLocY;
|
||||
|
||||
m_externalHostName = externalUri;
|
||||
|
||||
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port);
|
||||
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
|
||||
}
|
||||
|
||||
public LLUUID RegionID = LLUUID.Zero;
|
||||
@@ -270,7 +269,7 @@ namespace OpenSim.Framework
|
||||
{
|
||||
errorMessage = "needs an IP Address (IPAddress)";
|
||||
}
|
||||
this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort);
|
||||
this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", (int) NetworkServersInfo.DefaultHttpListenerPort);
|
||||
|
||||
string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1");
|
||||
if (externalHost != "SYSTEMIP")
|
||||
|
||||
@@ -51,7 +51,6 @@ namespace OpenSim.Framework
|
||||
m_externalHostName = ConvertFrom.ExternalHostName;
|
||||
m_remotingPort = ConvertFrom.RemotingPort;
|
||||
RemotingAddress = ConvertFrom.RemotingAddress;
|
||||
|
||||
}
|
||||
public SearializableRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
|
||||
{
|
||||
@@ -63,15 +62,14 @@ namespace OpenSim.Framework
|
||||
m_externalHostName = externalUri;
|
||||
}
|
||||
|
||||
public SearializableRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port)
|
||||
public SearializableRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port)
|
||||
{
|
||||
|
||||
m_regionLocX = regionLocX;
|
||||
m_regionLocY = regionLocY;
|
||||
|
||||
m_externalHostName = externalUri;
|
||||
|
||||
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port);
|
||||
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
|
||||
}
|
||||
|
||||
public LLUUID RegionID = LLUUID.Zero;
|
||||
|
||||
@@ -44,21 +44,21 @@ namespace OpenSim.Framework.Servers
|
||||
protected HttpListener m_httpListener;
|
||||
protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
|
||||
protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>();
|
||||
protected int m_port;
|
||||
protected uint m_port;
|
||||
protected bool m_ssl = false;
|
||||
protected bool m_firstcaps = true;
|
||||
|
||||
public int Port
|
||||
public uint Port
|
||||
{
|
||||
get { return m_port; }
|
||||
}
|
||||
|
||||
public BaseHttpServer(int port)
|
||||
public BaseHttpServer(uint port)
|
||||
{
|
||||
m_port = port;
|
||||
}
|
||||
|
||||
public BaseHttpServer(int port, bool ssl)
|
||||
public BaseHttpServer(uint port, bool ssl)
|
||||
{
|
||||
m_ssl = ssl;
|
||||
m_port = port;
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace OpenSim.Framework
|
||||
configMember.addConfigurationOption("default_inventory_server",
|
||||
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||
"Default Inventory Server URI",
|
||||
"http://127.0.0.1:8004/", false);
|
||||
"http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString() + "/", false);
|
||||
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||
"DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user