mirror of
https://github.com/opensim/opensim.git
synced 2026-08-02 23:18:34 +08:00
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:
@@ -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++)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user