summaryrefslogtreecommitdiff
path: root/src/net/messageout.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-01 12:38:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:54 +0300
commit11d80e856811ceddec805ce68b0a17b13f5cf25e (patch)
tree31e4c919f5acd2e20b5f805bbe8524b1d0f9f754 /src/net/messageout.cpp
parenta15146e08d00f9986edfde7a15a70790b64cc1ce (diff)
downloadmanaverse-11d80e856811ceddec805ce68b0a17b13f5cf25e.tar.gz
manaverse-11d80e856811ceddec805ce68b0a17b13f5cf25e.tar.bz2
manaverse-11d80e856811ceddec805ce68b0a17b13f5cf25e.tar.xz
manaverse-11d80e856811ceddec805ce68b0a17b13f5cf25e.zip
In debug packets logging also display offset.
Diffstat (limited to 'src/net/messageout.cpp')
-rw-r--r--src/net/messageout.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp
index ff778d89a..0026538b5 100644
--- a/src/net/messageout.cpp
+++ b/src/net/messageout.cpp
@@ -47,9 +47,10 @@ MessageOut::MessageOut(const int16_t id A_UNUSED) :
void MessageOut::writeInt8(const int8_t value, const char *const str)
{
- DEBUGLOG2("writeInt8: " + toStringPrint(static_cast<int>(value)), str);
expand(1);
mData[mPos] = value;
+ DEBUGLOG2("writeInt8: " + toStringPrint(static_cast<int>(value)),
+ mPos, str);
mPos += 1;
PacketCounters::incOutBytes(1);
}
@@ -83,8 +84,8 @@ void MessageOut::writeString(const std::string &string,
length - stringLength);
}
+ DEBUGLOG2("writeString: " + string, mPos, str);
mPos += length;
- DEBUGLOG2("writeString: " + string, str);
PacketCounters::incOutBytes(length);
}
@@ -117,8 +118,8 @@ void MessageOut::writeStringNoLog(const std::string &string,
length - stringLength);
}
+ DEBUGLOG2("writeString: ***", mPos, str);
mPos += length;
- DEBUGLOG2("writeString: ***", str);
PacketCounters::incOutBytes(length);
}