summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/messagein.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index 4fb61dc6a..8a51667db 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -262,6 +262,21 @@ char *MessageIn::readBytes(int length)
buf[length + 1] = 0;
mPos += length;
+#ifdef ENABLEDEBUGLOG
+ std::string str;
+ for (int f = 0;f < length; f ++)
+ str += strprintf ("%02x", buf[f]);
+ str += " ";
+ for (int f = 0;f < length; f ++)
+ {
+ if (buf[f])
+ str += strprintf ("%c", buf[f]);
+ else
+ str += "_";
+ }
+ logger->log("ReadBytes: " + str);
+#endif
+
PacketCounters::incInBytes(length);
return buf;
}