From 9de589bc37c4c6d0cb230bb02a3edd8217d1f9ae Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 15 Oct 2007 08:42:15 +0000 Subject: * Applied Chillken patch #419: consolidate_ports-r2096-3.patch - consolidated port number defaults. Thankx Chillken! --- OpenSim/Framework/General/Configuration/AssetConfig.cs | 5 +++-- OpenSim/Framework/General/Configuration/GridConfig.cs | 10 +++++----- OpenSim/Framework/General/Configuration/UserConfig.cs | 8 ++++---- OpenSim/Framework/General/Types/NetworkServersInfo.cs | 16 +++++++++------- OpenSim/Framework/General/Types/RegionInfo.cs | 5 ++--- 5 files changed, 23 insertions(+), 21 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/General/Configuration/AssetConfig.cs b/OpenSim/Framework/General/Configuration/AssetConfig.cs index 95f578c..a7c87ad 100644 --- a/OpenSim/Framework/General/Configuration/AssetConfig.cs +++ b/OpenSim/Framework/General/Configuration/AssetConfig.cs @@ -41,7 +41,8 @@ namespace OpenSim.Framework.Configuration public string DatabaseProvider = ""; - public uint HttpPort = 8003; + public static uint DefaultHttpPort = 8003; + public uint HttpPort = DefaultHttpPort; private ConfigurationMember configMember; @@ -57,7 +58,7 @@ namespace OpenSim.Framework.Configuration configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); - configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", "8003", false); + configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false); } diff --git a/OpenSim/Framework/General/Configuration/GridConfig.cs b/OpenSim/Framework/General/Configuration/GridConfig.cs index 2910c5c..9020404 100644 --- a/OpenSim/Framework/General/Configuration/GridConfig.cs +++ b/OpenSim/Framework/General/Configuration/GridConfig.cs @@ -48,7 +48,8 @@ namespace OpenSim.Framework.Configuration public string DatabaseProvider = ""; - public uint HttpPort = 8001; + public static uint DefaultHttpPort = 8001; + public uint HttpPort = DefaultHttpPort; private ConfigurationMember configMember; public GridConfig(string description, string filename) @@ -60,11 +61,11 @@ namespace OpenSim.Framework.Configuration public void loadConfigurationOptions() { configMember.addConfigurationOption("grid_owner", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "OGS Grid Owner", "OGS development team", false); - configMember.addConfigurationOption("default_asset_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Asset Server URI", "http://127.0.0.1:8003/", false); + configMember.addConfigurationOption("default_asset_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Asset Server URI", "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/", false); configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to asset server", "null", false); configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from asset server", "null", false); - configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:8002/", false); + configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false); configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false); configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false); @@ -72,7 +73,7 @@ namespace OpenSim.Framework.Configuration configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false); configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); - configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", "8001" , false); + configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false); } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) @@ -109,7 +110,6 @@ namespace OpenSim.Framework.Configuration case "database_provider": this.DatabaseProvider = (string)configuration_result; break; - case "http_port": HttpPort = (uint)configuration_result; break; diff --git a/OpenSim/Framework/General/Configuration/UserConfig.cs b/OpenSim/Framework/General/Configuration/UserConfig.cs index feeccdf..d664e94 100644 --- a/OpenSim/Framework/General/Configuration/UserConfig.cs +++ b/OpenSim/Framework/General/Configuration/UserConfig.cs @@ -44,7 +44,8 @@ namespace OpenSim.Framework.Configuration public string DatabaseProvider = ""; - public uint HttpPort = 8002; + public static uint DefaultHttpPort = 8002; + public uint HttpPort = DefaultHttpPort; private ConfigurationMember configMember; @@ -58,12 +59,12 @@ namespace OpenSim.Framework.Configuration { configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); - configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:8001/", false); + configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false); configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false); configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false); configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); - configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", "8002", false); + configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false); } @@ -86,7 +87,6 @@ namespace OpenSim.Framework.Configuration case "database_provider": this.DatabaseProvider = (string)configuration_result; break; - case "http_port": HttpPort = (uint)configuration_result; break; diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs index b65488a..9e4bdb1 100644 --- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs +++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs @@ -35,7 +35,7 @@ namespace OpenSim.Framework.Types { public class NetworkServersInfo { - public string AssetURL = "http://127.0.0.1:8003/"; + public string AssetURL = "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"; public string AssetSendKey = ""; public string GridURL = ""; @@ -46,7 +46,9 @@ namespace OpenSim.Framework.Types public string UserRecvKey = ""; public bool isSandbox; - public int HttpListenerPort = 9000; + public static int DefaultHttpListenerPort = 9000; + public int HttpListenerPort = DefaultHttpListenerPort; + public int RemotingListenerPort = 8895; @@ -77,15 +79,15 @@ namespace OpenSim.Framework.Types 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", 9000); - RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", 8895); - GridURL = config.Configs["Network"].GetString("grid_server_url", "http://127.0.0.1:8001"); + HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort); + RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort); + GridURL = config.Configs["Network"].GetString("grid_server_url", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString()); GridSendKey = config.Configs["Network"].GetString("grid_send_key", "null"); GridRecvKey = config.Configs["Network"].GetString("grid_recv_key", "null"); - UserURL = config.Configs["Network"].GetString("user_server_url", "http://127.0.0.1:8002"); + UserURL = config.Configs["Network"].GetString("user_server_url", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString()); UserSendKey = config.Configs["Network"].GetString("user_send_key", "null"); UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null"); - AssetURL = config.Configs["Network"].GetString("asset_server_url", "http://127.0.0.1:8003"); + AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL); } } diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index c1e040d..5054510 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs @@ -196,7 +196,7 @@ namespace OpenSim.Framework.Types { errorMessage = "needs an IP Address (IPAddress)"; } - this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", (int)9000); + this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort); string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); if (externalHost != "SYSTEMIP") @@ -226,12 +226,11 @@ namespace OpenSim.Framework.Types configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false); configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false); configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false); - configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", "9000", false); + configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false); configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false); configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false); - } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) -- cgit v1.1