From c75d4156487b35aac47aa6818144862a99bb841c Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 27 Oct 2009 00:26:56 -0700 Subject: * Converts ClientManager.ForEach() (and as a result, Scene.ForEachClient()) to use a non-blocking parallel method when operating in async mode * Minor code readability cleanup --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 8 +++++--- OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 31028b3..f6a7a0c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2105,12 +2105,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) { ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect); - packet.Effect = effectBlocks; + packet.Header.Reliable = false; + packet.Header.Zerocoded = true; packet.AgentData.AgentID = AgentId; packet.AgentData.SessionID = SessionId; - packet.Header.Reliable = false; - packet.Header.Zerocoded = true; + + packet.Effect = effectBlocks; + OutPacket(packet, ThrottleOutPacketType.State); } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index a823f3b..84a4959 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs @@ -372,7 +372,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OpenSim.Framework.LocklessQueue queue = m_packetOutboxes[category]; TokenBucket bucket = m_throttleCategories[category]; - if (m_throttleCategories[category].RemoveTokens(packet.Buffer.DataLength)) + if (bucket.RemoveTokens(packet.Buffer.DataLength)) { // Enough tokens were removed from the bucket, the packet will not be queued return false; -- cgit v1.1