NextAnimationSequenceNumber be a udpserver variable with random start

avinationmerge
UbitUmarov 2014-08-16 13:43:26 +01:00
parent 7d967c37f4
commit 1edaf29149
2 changed files with 22 additions and 2 deletions

View File

@ -358,7 +358,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// protected HashSet<uint> m_attachmentsSent;
private bool m_deliverPackets = true;
private int m_animationSequenceNumber = 1;
private bool m_SendLogoutPacketWhenClosing = true;
/// <summary>
@ -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; }
}
/// <summary>
/// As well as it's function in IClientAPI, in LLClientView we are locking on this property in order to

View File

@ -293,6 +293,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary>Flag to signal when clients should send pings</summary>
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<IPEndPoint, Queue<UDPPacketBuffer>> m_pendingCache = new ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>>();
@ -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();
}