summaryrefslogtreecommitdiff
path: root/src/net/messagein.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r--src/net/messagein.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index bdac098c5..22d0510ce 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -473,20 +473,23 @@ unsigned char *MessageIn::readBytes(int length, const char *const dstr)
mPos += length;
#ifdef ENABLEDEBUGLOG
- std::string str;
- for (int f = 0; f < length; f ++)
- str.append(strprintf("%02x", CAST_U32(buf[f])));
- str += " ";
- for (int f = 0; f < length; f ++)
+ if (!mIgnore)
{
- if (buf[f] != 0U)
- str.append(strprintf("%c", buf[f]));
- else
- str.append("_");
+ std::string str;
+ for (int f = 0; f < length; f ++)
+ str.append(strprintf("%02x", CAST_U32(buf[f])));
+ str += " ";
+ for (int f = 0; f < length; f ++)
+ {
+ if (buf[f] != 0U)
+ str.append(strprintf("%c", buf[f]));
+ else
+ str.append("_");
+ }
+ if (dstr != nullptr)
+ logger->dlog(dstr);
+ logger->dlog("ReadBytes: " + str);
}
- if (dstr != nullptr)
- logger->dlog(dstr);
- logger->dlog("ReadBytes: " + str);
#endif // ENABLEDEBUGLOG
PacketCounters::incInBytes(length);