From 69776aa70ce662ccd0ad3d9f2ecefb86671bbcb3 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 13 Dec 2016 19:47:26 +0000 Subject: Remove the AllowAlternatePorts option. It wasn't implemented anyway. Instead, handle the port being 0 as "any port" and assign a random port for regions in that case. --- OpenSim/Framework/RegionInfo.cs | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index adffe13..8f754a5 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -138,8 +138,6 @@ namespace OpenSim.Framework protected uint m_httpPort; protected string m_serverURI; protected string m_regionName = String.Empty; - protected bool Allow_Alternate_Ports; - public bool m_allow_alternate_ports; protected string m_externalHostName; protected IPEndPoint m_internalEndPoint; protected uint m_remotingPort; @@ -673,20 +671,6 @@ namespace OpenSim.Framework } m_internalEndPoint = new IPEndPoint(address, port); - // AllowAlternatePorts - // - allKeys.Remove("AllowAlternatePorts"); - if (config.Contains("AllowAlternatePorts")) - { - m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true); - } - else - { - m_allow_alternate_ports = Convert.ToBoolean(MainConsole.Instance.CmdPrompt("Allow alternate ports", "False")); - - config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString()); - } - // ResolveAddress // allKeys.Remove("ResolveAddress"); @@ -925,8 +909,6 @@ namespace OpenSim.Framework config.Set("InternalAddress", m_internalEndPoint.Address.ToString()); config.Set("InternalPort", m_internalEndPoint.Port); - config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString()); - config.Set("ExternalHostName", m_externalHostName); if (m_nonphysPrimMin > 0) @@ -1019,10 +1001,6 @@ namespace OpenSim.Framework configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", m_internalEndPoint.Port.ToString(), true); - configMember.addConfigurationOption("allow_alternate_ports", - ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, - "Allow sim to find alternate UDP ports when ports are in use?", - m_allow_alternate_ports.ToString(), true); configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", m_externalHostName, true); @@ -1092,9 +1070,6 @@ namespace OpenSim.Framework configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", ConfigSettings.DefaultRegionHttpPort.ToString(), false); - configMember.addConfigurationOption("allow_alternate_ports", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, - "Allow sim to find alternate UDP ports when ports are in use?", - "false", true); configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); @@ -1165,9 +1140,6 @@ namespace OpenSim.Framework case "internal_ip_port": m_internalEndPoint.Port = (int) configuration_result; break; - case "allow_alternate_ports": - m_allow_alternate_ports = (bool) configuration_result; - break; case "external_host_name": if ((string) configuration_result != "SYSTEMIP") { @@ -1244,7 +1216,6 @@ namespace OpenSim.Framework if ((RemotingAddress != null) && !RemotingAddress.Equals("")) args["remoting_address"] = OSD.FromString(RemotingAddress); args["remoting_port"] = OSD.FromString(RemotingPort.ToString()); - args["allow_alt_ports"] = OSD.FromBoolean(m_allow_alternate_ports); if ((proxyUrl != null) && !proxyUrl.Equals("")) args["proxy_url"] = OSD.FromString(proxyUrl); if (RegionType != String.Empty) @@ -1299,8 +1270,6 @@ namespace OpenSim.Framework RemotingAddress = args["remoting_address"].AsString(); if (args["remoting_port"] != null) UInt32.TryParse(args["remoting_port"].AsString(), out m_remotingPort); - if (args["allow_alt_ports"] != null) - m_allow_alternate_ports = args["allow_alt_ports"].AsBoolean(); if (args["proxy_url"] != null) proxyUrl = args["proxy_url"].AsString(); if (args["region_type"] != null) @@ -1338,7 +1307,8 @@ namespace OpenSim.Framework kvp["http_port"] = HttpPort.ToString(); kvp["internal_ip_address"] = InternalEndPoint.Address.ToString(); kvp["internal_port"] = InternalEndPoint.Port.ToString(); - kvp["alternate_ports"] = m_allow_alternate_ports.ToString(); + // TODO: Remove in next major version + kvp["alternate_ports"] = "False"; kvp["server_uri"] = ServerURI; return kvp; -- cgit v1.1