mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-31 18:36:24 -05:00
added code to display msg text in debug mode
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4180 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4e494c5453
commit
34fc615d2c
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
/***
|
/***
|
||||||
#define RSSERIAL_DEBUG 1
|
#define RSSERIAL_DEBUG 1
|
||||||
|
#define CHAT_DEBUG 1
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -223,6 +224,14 @@ bool RsChatMsgItem::serialise(void *data, uint32_t& pktsize)
|
|||||||
ok &= setRawUInt32(data, tlvsize, &offset, chatFlags);
|
ok &= setRawUInt32(data, tlvsize, &offset, chatFlags);
|
||||||
ok &= setRawUInt32(data, tlvsize, &offset, sendTime);
|
ok &= setRawUInt32(data, tlvsize, &offset, sendTime);
|
||||||
ok &= SetTlvWideString(data, tlvsize, &offset, TLV_TYPE_WSTR_MSG, message);
|
ok &= SetTlvWideString(data, tlvsize, &offset, TLV_TYPE_WSTR_MSG, message);
|
||||||
|
#ifdef CHAT_DEBUG
|
||||||
|
std::cerr << "Serialized the following message:" << std::endl;
|
||||||
|
std::cerr << "========== BEGIN MESSAGE =========" << std::endl;
|
||||||
|
for(int i=0;i<message.length();++i)
|
||||||
|
std::cerr << (char)message[i] ;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
std::cerr << "=========== END MESSAGE ==========" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (offset != tlvsize)
|
if (offset != tlvsize)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user