mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
enabled display serialisation errors in p3service
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6790 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3a82fffd0e
commit
f961dc9066
@ -155,10 +155,8 @@ int p3FastService::sendItem(RsItem *si)
|
||||
uint32_t size = rsSerialiser->size(si);
|
||||
if (!size)
|
||||
{
|
||||
#ifdef SERV_DEBUG
|
||||
std::cerr << "p3Service::send() ERROR size == 0";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
/* can't convert! */
|
||||
delete si;
|
||||
@ -168,20 +166,18 @@ int p3FastService::sendItem(RsItem *si)
|
||||
RsRawItem *raw = new RsRawItem(si->PacketId(), size);
|
||||
if (!rsSerialiser->serialise(si, raw->getRawData(), &size))
|
||||
{
|
||||
#ifdef SERV_DEBUG
|
||||
std::cerr << "p3Service::send() ERROR serialise failed";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
delete raw;
|
||||
raw = NULL;
|
||||
}
|
||||
|
||||
if ((raw) && (size != raw->getRawLength()))
|
||||
{
|
||||
#ifdef SERV_DEBUG
|
||||
std::cerr << "p3Service::send() ERROR serialise size mismatch";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
delete raw;
|
||||
raw = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user