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.
This commit is contained in:
Melanie Thielker
2016-12-13 19:47:26 +00:00
parent ee58beddec
commit 69776aa70c
5 changed files with 21 additions and 40 deletions

View File

@@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
uint port = (uint)scene.RegionInfo.InternalEndPoint.Port;
IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address;
Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, scene.RegionInfo.m_allow_alternate_ports, m_Config, scene.AuthenticateHandler);
Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, m_Config, scene.AuthenticateHandler);
scene.RegionInfo.InternalEndPoint.Port = (int)port;
AddScene(scene);
@@ -98,9 +98,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
#endregion
public virtual void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager)
public virtual void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, IConfigSource configSource, AgentCircuitManager circuitManager)
{
m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager);
m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, configSource, circuitManager);
}
public virtual void AddScene(IScene scene)
@@ -430,12 +430,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public JobEngine OqrEngine { get; protected set; }
public LLUDPServer(
IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port,
IPAddress listenIP, ref uint port, int proxyPortOffsetParm,
IConfigSource configSource, AgentCircuitManager circuitManager)
: base(listenIP, (int)port)
{
#region Environment.TickCount Measurement
// Update the port with the one we actually got
port = (uint)Port;
// Measure the resolution of Environment.TickCount
TickCountResolution = 0f;
for (int i = 0; i < 10; i++)

View File

@@ -107,6 +107,11 @@ namespace OpenMetaverse
/// </summary>
public float AverageReceiveTicksForLastSamplePeriod { get; private set; }
public int Port
{
get { return m_udpPort; }
}
#region PacketDropDebugging
/// <summary>
/// For debugging purposes only... random number generator for dropping
@@ -257,6 +262,9 @@ namespace OpenMetaverse
m_udpSocket.Bind(ipep);
if (m_udpPort == 0)
m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port;
IsRunningInbound = true;
// kick off an async receive. The Start() method will return, the