Thank you, lulurun, for a patch to fix a possible crash when a received
packet contains a quaternion with all members zeroed.
0.6.0-stable
Melanie Thielker 2008-09-03 11:25:11 +00:00
parent 0fc55818ca
commit dba779862d
1 changed files with 17 additions and 6 deletions

View File

@ -389,12 +389,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if ((q.Count == 0) && (throttle.UnderLimit()))
{
Monitor.Enter(this);
throttle.Add(item.Packet.ToBytes().Length);
TotalThrottle.Add(item.Packet.ToBytes().Length);
SendQueue.Enqueue(item);
Monitor.Pulse(this);
Monitor.Exit(this);
try
{
Monitor.Enter(this);
throttle.Add(item.Packet.ToBytes().Length);
TotalThrottle.Add(item.Packet.ToBytes().Length);
SendQueue.Enqueue(item);
}
catch (Exception e)
{
// Probably a serialization exception
m_log.WarnFormat("ThrottleCheck: {0}", e.ToString());
}
finally
{
Monitor.Pulse(this);
Monitor.Exit(this);
}
}
else
{