diff options
author | John Hurliman | 2009-10-13 12:50:59 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-13 12:50:59 -0700 |
commit | c893761319f7e61d13b2d2301180d0f227fde1a9 (patch) | |
tree | da652a4c57810aee11f50458d09736bb820a4048 /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |
parent | Avoid checking m_clients collection twice when a UseCircuitCode packet is rec... (diff) | |
download | opensim-SC_OLD-c893761319f7e61d13b2d2301180d0f227fde1a9.zip opensim-SC_OLD-c893761319f7e61d13b2d2301180d0f227fde1a9.tar.gz opensim-SC_OLD-c893761319f7e61d13b2d2301180d0f227fde1a9.tar.bz2 opensim-SC_OLD-c893761319f7e61d13b2d2301180d0f227fde1a9.tar.xz |
* Unregister event handlers in LLUDPServer when a client logs out and disconnects
* Move ViewerEffect handling to Scene.PacketHandlers
* Removing the unused CloseAllAgents function
* Trimming ClientManager down. This class needs to be reworked to keep LLUDP circuit codes from intruding into the abstract OpenSim core code
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 2228f39..04c9cb1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -419,7 +419,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
419 | 419 | ||
420 | int dataLength = buffer.DataLength; | 420 | int dataLength = buffer.DataLength; |
421 | 421 | ||
422 | // Keep appending ACKs until there is no room left in the packet or there are | 422 | // Keep appending ACKs until there is no room left in the buffer or there are |
423 | // no more ACKs to append | 423 | // no more ACKs to append |
424 | uint ackCount = 0; | 424 | uint ackCount = 0; |
425 | uint ack; | 425 | uint ack; |
@@ -654,11 +654,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
654 | 654 | ||
655 | // Create the LLClientView | 655 | // Create the LLClientView |
656 | LLClientView clientApi = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); | 656 | LLClientView clientApi = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); |
657 | clientApi.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler; | ||
658 | clientApi.OnLogout += LogoutHandler; | 657 | clientApi.OnLogout += LogoutHandler; |
659 | clientApi.OnConnectionClosed += | 658 | clientApi.OnConnectionClosed += ConnectionClosedHandler; |
660 | delegate(IClientAPI client) | ||
661 | { if (client is LLClientView) RemoveClient(((LLClientView)client).UDPClient); }; | ||
662 | 659 | ||
663 | // Start the IClientAPI | 660 | // Start the IClientAPI |
664 | m_scene.ClientManager.Add(circuitCode, clientApi); | 661 | m_scene.ClientManager.Add(circuitCode, clientApi); |
@@ -808,7 +805,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
808 | 805 | ||
809 | private void LogoutHandler(IClientAPI client) | 806 | private void LogoutHandler(IClientAPI client) |
810 | { | 807 | { |
808 | client.OnLogout -= LogoutHandler; | ||
809 | |||
811 | client.SendLogoutPacket(); | 810 | client.SendLogoutPacket(); |
811 | |||
812 | if (client is LLClientView) | ||
813 | RemoveClient(((LLClientView)client).UDPClient); | ||
814 | } | ||
815 | |||
816 | private void ConnectionClosedHandler(IClientAPI client) | ||
817 | { | ||
818 | client.OnConnectionClosed -= ConnectionClosedHandler; | ||
819 | |||
812 | if (client is LLClientView) | 820 | if (client is LLClientView) |
813 | RemoveClient(((LLClientView)client).UDPClient); | 821 | RemoveClient(((LLClientView)client).UDPClient); |
814 | } | 822 | } |