Streamlined error logging for malformed packets and fixed a bug when printing the hex dump
parent
d506449f67
commit
c6dd670d58
|
@ -596,15 +596,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
catch (MalformedDataException)
|
catch (MalformedDataException)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[LLUDPSERVER]: Malformed data, cannot parse packet from {0}:\n{1}",
|
|
||||||
buffer.RemoteEndPoint, Utils.BytesToHexString(buffer.Data, buffer.DataLength, null));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fail-safe check
|
// Fail-safe check
|
||||||
if (packet == null)
|
if (packet == null)
|
||||||
{
|
{
|
||||||
m_log.Warn("[LLUDPSERVER]: Couldn't build a message from incoming data " + buffer.DataLength +
|
m_log.ErrorFormat("[LLUDPSERVER]: Malformed data, cannot parse {0} byte packet from {1}:",
|
||||||
" bytes long from " + buffer.RemoteEndPoint);
|
buffer.DataLength, buffer.RemoteEndPoint);
|
||||||
|
m_log.Error(Utils.BytesToHexString(buffer.Data, buffer.DataLength, null));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue