aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
diff options
context:
space:
mode:
authoronefang2019-07-08 13:35:18 +1000
committeronefang2019-07-08 13:35:18 +1000
commit1ec53d689307da4b49d09ba264d73816d036bf94 (patch)
treea87ce12d1814a6bf0758ae3e31a45c30e71d9ab0 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
parentUse F1 instead of ? as the in command help key. (diff)
downloadopensim-SC_OLD-1ec53d689307da4b49d09ba264d73816d036bf94.zip
opensim-SC_OLD-1ec53d689307da4b49d09ba264d73816d036bf94.tar.gz
opensim-SC_OLD-1ec53d689307da4b49d09ba264d73816d036bf94.tar.bz2
opensim-SC_OLD-1ec53d689307da4b49d09ba264d73816d036bf94.tar.xz
Attempt to render "[LLUDPSERVER]: Malformed data, cannot parse" into something human readable as an aid to diagnosis.
Beats hand translating the big block of hex codes it was spewing.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index b575ed9..69239b1 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -32,6 +32,8 @@ using System.IO;
32using System.Net; 32using System.Net;
33using System.Net.Sockets; 33using System.Net.Sockets;
34using System.Reflection; 34using System.Reflection;
35using System.Text;
36using System.Text.RegularExpressions;
35using System.Threading; 37using System.Threading;
36using log4net; 38using log4net;
37using Nini.Config; 39using Nini.Config;
@@ -1311,8 +1313,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1311 { 1313 {
1312 if (IncomingMalformedPacketCount < 100) 1314 if (IncomingMalformedPacketCount < 100)
1313 { 1315 {
1314 m_log.WarnFormat("[LLUDPSERVER]: Malformed data, cannot parse {0} byte packet from {1}, data {2}:", 1316 m_log.WarnFormat("[LLUDPSERVER]: Malformed data, cannot parse {0} byte packet from {1}, data as hex {2}: {3}",
1315 buffer.DataLength, buffer.RemoteEndPoint, Utils.BytesToHexString(buffer.Data, buffer.DataLength, null)); 1317 buffer.DataLength, buffer.RemoteEndPoint, Utils.BytesToHexString(buffer.Data, buffer.DataLength, null),
1318 Regex.Replace(Encoding.UTF8.GetString(buffer.Data, 0, buffer.DataLength), @"\p{Cc}", a=>string.Format("[{0:X2}]", (byte)a.Value[0])));
1316 } 1319 }
1317 1320
1318 RecordMalformedInboundPacket(endPoint); 1321 RecordMalformedInboundPacket(endPoint);