From 1edaf29149c767a2742b44d69308edb2e2d64428 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 16 Aug 2014 13:43:26 +0100 Subject: NextAnimationSequenceNumber be a udpserver variable with random start --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 +++++-- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e69bf23..6f41ac8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -358,7 +358,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // protected HashSet m_attachmentsSent; private bool m_deliverPackets = true; - private int m_animationSequenceNumber = 1; + private bool m_SendLogoutPacketWhenClosing = true; /// @@ -450,7 +450,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP public string Name { get { return FirstName + " " + LastName; } } public uint CircuitCode { get { return m_circuitCode; } } - public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } + public int NextAnimationSequenceNumber + { + get { return m_udpServer.NextAnimationSequenceNumber; } + } /// /// As well as it's function in IClientAPI, in LLClientView we are locking on this property in order to diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index bd192dc..3b0312d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -293,6 +293,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Flag to signal when clients should send pings protected bool m_sendPing; + private int m_animationSequenceNumber; + + public int NextAnimationSequenceNumber + { + get + { + m_animationSequenceNumber++; + if (m_animationSequenceNumber > 2147482624) + m_animationSequenceNumber = 1; + return m_animationSequenceNumber; + } + } + + private ExpiringCache> m_pendingCache = new ExpiringCache>(); @@ -438,6 +452,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_throttle = new TokenBucket(null, sceneThrottleBps); ThrottleRates = new ThrottleRates(configSource); + Random rnd = new Random(Util.EnvironmentTickCount()); + m_animationSequenceNumber = rnd.Next(11474826); + if (usePools) EnablePools(); } -- cgit v1.1