mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'master' into httptests
This commit is contained in:
@@ -2704,7 +2704,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
OutPacket(packet, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
|
||||
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
|
||||
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
|
||||
UUID partnerID)
|
||||
{
|
||||
@@ -2716,7 +2716,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
else
|
||||
avatarReply.PropertiesData.AboutText = Utils.EmptyBytes;
|
||||
avatarReply.PropertiesData.BornOn = Util.StringToBytes256(bornOn);
|
||||
avatarReply.PropertiesData.CharterMember = charterMember;
|
||||
avatarReply.PropertiesData.CharterMember = membershipType;
|
||||
if (flAbout != null)
|
||||
avatarReply.PropertiesData.FLAboutText = Util.StringToBytes256(flAbout);
|
||||
else
|
||||
|
||||
@@ -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
|
||||
@@ -217,10 +222,6 @@ namespace OpenMetaverse
|
||||
SocketType.Dgram,
|
||||
ProtocolType.Udp);
|
||||
|
||||
// OpenSim may need this but in AVN, this messes up automated
|
||||
// sim restarts badly
|
||||
//m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
|
||||
|
||||
try
|
||||
{
|
||||
if (m_udpSocket.Ttl < 128)
|
||||
@@ -248,13 +249,22 @@ namespace OpenMetaverse
|
||||
// we never want two regions to listen on the same port as they cannot demultiplex each other's messages,
|
||||
// leading to a confusing bug.
|
||||
// By default, Windows does not allow two sockets to bind to the same port.
|
||||
m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
|
||||
//
|
||||
// Unfortunately, this also causes a crashed sim to leave the socket in a state
|
||||
// where it appears to be in use but is really just hung from the old process
|
||||
// crashing rather than closing it. While this protects agains misconfiguration,
|
||||
// allowing crashed sims to be started up again right away, rather than having to
|
||||
// wait 2 minutes for the socket to clear is more valuable. Commented 12/13/2016
|
||||
// m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
|
||||
|
||||
if (recvBufferSize != 0)
|
||||
m_udpSocket.ReceiveBufferSize = recvBufferSize;
|
||||
|
||||
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