From 0b7f82153beea3027313d64378f757a89174ece1 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 24 May 2008 18:17:31 +0000 Subject: * Temporary fix for mantis 1374 * If the agent throttle byte array is unexpectedly empty, then log a warning and drop the packet --- OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 8655d80..fb14a35 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -40,7 +40,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { public class LLPacketQueue : IPullStatsProvider { - //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly log4net.ILog m_log + = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private bool m_enabled = true; @@ -415,6 +416,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SetThrottleFromClient(byte[] throttle) { + // From mantis http://opensimulator.org/mantis/view.php?id=1374 + // it appears that sometimes we are receiving empty throttle byte arrays. + // TODO: Investigate this behaviour + if (throttle.Length == 0) + { + m_log.Warn("[PACKET QUEUE]: SetThrottleFromClient unexpectedly received a throttle byte array containing no elements!"); + return; + } + int tResend = -1; int tLand = -1; int tWind = -1; -- cgit v1.1