diff options
author | John Hurliman | 2009-10-26 13:38:07 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-26 13:38:07 -0700 |
commit | c04775bf682866cfa4009c28a4152c6ad549cdb2 (patch) | |
tree | 2a320b68dc5f3440b1ad5ec07692705e898ff5b1 /OpenSim | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-c04775bf682866cfa4009c28a4152c6ad549cdb2.zip opensim-SC-c04775bf682866cfa4009c28a4152c6ad549cdb2.tar.gz opensim-SC-c04775bf682866cfa4009c28a4152c6ad549cdb2.tar.bz2 opensim-SC-c04775bf682866cfa4009c28a4152c6ad549cdb2.tar.xz |
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
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 82ae640..8c3c5be 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -570,18 +570,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
570 | // UseCircuitCode handling | 570 | // UseCircuitCode handling |
571 | if (packet.Type == PacketType.UseCircuitCode) | 571 | if (packet.Type == PacketType.UseCircuitCode) |
572 | { | 572 | { |
573 | Util.FireAndForget( | 573 | m_log.Debug("[LLUDPSERVER]: Handling UseCircuitCode packet from " + buffer.RemoteEndPoint); |
574 | delegate(object o) | 574 | object[] array = new object[] { buffer, packet }; |
575 | { | ||
576 | IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; | ||
577 | 575 | ||
578 | // Begin the process of adding the client to the simulator | 576 | if (m_asyncPacketHandling) |
579 | AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint); | 577 | Util.FireAndForget(HandleUseCircuitCode, array); |
578 | else | ||
579 | HandleUseCircuitCode(array); | ||
580 | 580 | ||
581 | // Acknowledge the UseCircuitCode packet | ||
582 | SendAckImmediate(remoteEndPoint, packet.Header.Sequence); | ||
583 | } | ||
584 | ); | ||
585 | return; | 581 | return; |
586 | } | 582 | } |
587 | 583 | ||
@@ -692,6 +688,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
692 | packetInbox.Enqueue(new IncomingPacket(udpClient, packet)); | 688 | packetInbox.Enqueue(new IncomingPacket(udpClient, packet)); |
693 | } | 689 | } |
694 | 690 | ||
691 | private void HandleUseCircuitCode(object o) | ||
692 | { | ||
693 | object[] array = (object[])o; | ||
694 | UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; | ||
695 | UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1]; | ||
696 | |||
697 | IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; | ||
698 | |||
699 | // Begin the process of adding the client to the simulator | ||
700 | AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint); | ||
701 | |||
702 | // Acknowledge the UseCircuitCode packet | ||
703 | SendAckImmediate(remoteEndPoint, packet.Header.Sequence); | ||
704 | } | ||
705 | |||
695 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) | 706 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) |
696 | { | 707 | { |
697 | PacketAckPacket ack = new PacketAckPacket(); | 708 | PacketAckPacket ack = new PacketAckPacket(); |