Changed UseCircuitCode handling to be synchronous or asynchronous depending on the async_packet_handling config option, and added a debug log message when a UseCircuitCode packet is handled
parent
ff65b50236
commit
c04775bf68
|
@ -570,18 +570,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// UseCircuitCode handling
|
||||
if (packet.Type == PacketType.UseCircuitCode)
|
||||
{
|
||||
Util.FireAndForget(
|
||||
delegate(object o)
|
||||
{
|
||||
IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
|
||||
m_log.Debug("[LLUDPSERVER]: Handling UseCircuitCode packet from " + buffer.RemoteEndPoint);
|
||||
object[] array = new object[] { buffer, packet };
|
||||
|
||||
// Begin the process of adding the client to the simulator
|
||||
AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint);
|
||||
if (m_asyncPacketHandling)
|
||||
Util.FireAndForget(HandleUseCircuitCode, array);
|
||||
else
|
||||
HandleUseCircuitCode(array);
|
||||
|
||||
// Acknowledge the UseCircuitCode packet
|
||||
SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -692,6 +688,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
packetInbox.Enqueue(new IncomingPacket(udpClient, packet));
|
||||
}
|
||||
|
||||
private void HandleUseCircuitCode(object o)
|
||||
{
|
||||
object[] array = (object[])o;
|
||||
UDPPacketBuffer buffer = (UDPPacketBuffer)array[0];
|
||||
UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1];
|
||||
|
||||
IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
|
||||
|
||||
// Begin the process of adding the client to the simulator
|
||||
AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint);
|
||||
|
||||
// Acknowledge the UseCircuitCode packet
|
||||
SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
|
||||
}
|
||||
|
||||
private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber)
|
||||
{
|
||||
PacketAckPacket ack = new PacketAckPacket();
|
||||
|
|
Loading…
Reference in New Issue