aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-13 17:33:45 -0700
committerJohn Hurliman2009-10-13 17:33:45 -0700
commitdc11643c007adf7a640ec4fbabe25995352aaa18 (patch)
tree108b5f7234756c5395d4ca518cfeb03454f62ace /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
parent* Fixed a bug where clients were being added to ClientManager twice (diff)
downloadopensim-SC_OLD-dc11643c007adf7a640ec4fbabe25995352aaa18.zip
opensim-SC_OLD-dc11643c007adf7a640ec4fbabe25995352aaa18.tar.gz
opensim-SC_OLD-dc11643c007adf7a640ec4fbabe25995352aaa18.tar.bz2
opensim-SC_OLD-dc11643c007adf7a640ec4fbabe25995352aaa18.tar.xz
* Consolidated adding / removing ClientManager IClientAPIs to two places in Scene
* Added some missing implementations of IClientAPI.RemoteEndPoint * Added a ClientManager.Remove(UUID) overload * Removed a reference to a missing project from prebuild.xml
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs13
1 files changed, 3 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 22c275c..8689af3 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -646,7 +646,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
646 client.OnConnectionClosed += ConnectionClosedHandler; 646 client.OnConnectionClosed += ConnectionClosedHandler;
647 647
648 // Start the IClientAPI 648 // Start the IClientAPI
649 m_scene.ClientManager.Add(client);
650 client.Start(); 649 client.Start();
651 } 650 }
652 else 651 else
@@ -658,10 +657,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
658 657
659 private void RemoveClient(LLUDPClient udpClient) 658 private void RemoveClient(LLUDPClient udpClient)
660 { 659 {
661 // Remove this client from the scene ClientManager 660 // Remove this client from the scene
662 IClientAPI client; 661 IClientAPI client;
663 if (m_scene.ClientManager.TryGetValue(udpClient.AgentID, out client)) 662 if (m_scene.ClientManager.TryGetValue(udpClient.AgentID, out client))
664 Util.FireAndForget(delegate(object o) { client.Close(); }); 663 client.Close();
665 } 664 }
666 665
667 private void AcknowledgePacket(LLUDPClient client, uint ack, int currentTime, bool fromResend) 666 private void AcknowledgePacket(LLUDPClient client, uint ack, int currentTime, bool fromResend)
@@ -810,19 +809,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
810 private void LogoutHandler(IClientAPI client) 809 private void LogoutHandler(IClientAPI client)
811 { 810 {
812 client.OnLogout -= LogoutHandler; 811 client.OnLogout -= LogoutHandler;
813
814 client.SendLogoutPacket(); 812 client.SendLogoutPacket();
815
816 if (client is LLClientView)
817 RemoveClient(((LLClientView)client).UDPClient);
818 } 813 }
819 814
820 private void ConnectionClosedHandler(IClientAPI client) 815 private void ConnectionClosedHandler(IClientAPI client)
821 { 816 {
822 client.OnConnectionClosed -= ConnectionClosedHandler; 817 client.OnConnectionClosed -= ConnectionClosedHandler;
823 818 RemoveClient(((LLClientView)client).UDPClient);
824 if (client is LLClientView)
825 RemoveClient(((LLClientView)client).UDPClient);
826 } 819 }
827 } 820 }
828} 821}