diff options
author | Melanie Thielker | 2008-09-03 11:25:11 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-03 11:25:11 +0000 |
commit | dba779862d4b5e092bc5fc717cafb2a13f005368 (patch) | |
tree | e84aafb0d93e491790c2a45f49182dac92eb88e2 | |
parent | Mantis #2109 (diff) | |
download | opensim-SC_OLD-dba779862d4b5e092bc5fc717cafb2a13f005368.zip opensim-SC_OLD-dba779862d4b5e092bc5fc717cafb2a13f005368.tar.gz opensim-SC_OLD-dba779862d4b5e092bc5fc717cafb2a13f005368.tar.bz2 opensim-SC_OLD-dba779862d4b5e092bc5fc717cafb2a13f005368.tar.xz |
Mantis #2107
Thank you, lulurun, for a patch to fix a possible crash when a received
packet contains a quaternion with all members zeroed.
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 3071110..94f7214 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -389,12 +389,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
389 | 389 | ||
390 | if ((q.Count == 0) && (throttle.UnderLimit())) | 390 | if ((q.Count == 0) && (throttle.UnderLimit())) |
391 | { | 391 | { |
392 | Monitor.Enter(this); | 392 | try |
393 | throttle.Add(item.Packet.ToBytes().Length); | 393 | { |
394 | TotalThrottle.Add(item.Packet.ToBytes().Length); | 394 | Monitor.Enter(this); |
395 | SendQueue.Enqueue(item); | 395 | throttle.Add(item.Packet.ToBytes().Length); |
396 | Monitor.Pulse(this); | 396 | TotalThrottle.Add(item.Packet.ToBytes().Length); |
397 | Monitor.Exit(this); | 397 | SendQueue.Enqueue(item); |
398 | } | ||
399 | catch (Exception e) | ||
400 | { | ||
401 | // Probably a serialization exception | ||
402 | m_log.WarnFormat("ThrottleCheck: {0}", e.ToString()); | ||
403 | } | ||
404 | finally | ||
405 | { | ||
406 | Monitor.Pulse(this); | ||
407 | Monitor.Exit(this); | ||
408 | } | ||
398 | } | 409 | } |
399 | else | 410 | else |
400 | { | 411 | { |