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
|
// UseCircuitCode handling
|
||||||
if (packet.Type == PacketType.UseCircuitCode)
|
if (packet.Type == PacketType.UseCircuitCode)
|
||||||
{
|
{
|
||||||
Util.FireAndForget(
|
m_log.Debug("[LLUDPSERVER]: Handling UseCircuitCode packet from " + buffer.RemoteEndPoint);
|
||||||
delegate(object o)
|
object[] array = new object[] { buffer, packet };
|
||||||
{
|
|
||||||
IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
|
|
||||||
|
|
||||||
// Begin the process of adding the client to the simulator
|
if (m_asyncPacketHandling)
|
||||||
AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint);
|
Util.FireAndForget(HandleUseCircuitCode, array);
|
||||||
|
else
|
||||||
|
HandleUseCircuitCode(array);
|
||||||
|
|
||||||
// Acknowledge the UseCircuitCode packet
|
|
||||||
SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -692,6 +688,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
packetInbox.Enqueue(new IncomingPacket(udpClient, packet));
|
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)
|
private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber)
|
||||||
{
|
{
|
||||||
PacketAckPacket ack = new PacketAckPacket();
|
PacketAckPacket ack = new PacketAckPacket();
|
||||||
|
|
Loading…
Reference in New Issue