* Temporary fix for mantis 1374

* If the agent throttle byte array is unexpectedly empty, then log a warning and drop the packet
0.6.0-stable
Justin Clarke Casey 2008-05-24 18:17:31 +00:00
parent 375673ec90
commit 0b7f82153b
1 changed files with 11 additions and 1 deletions

View File

@ -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;