mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-16 18:07:11 -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);
|
uint32_t size = rsSerialiser->size(si);
|
||||||
if (!size)
|
if (!size)
|
||||||
{
|
{
|
||||||
#ifdef SERV_DEBUG
|
|
||||||
std::cerr << "p3Service::send() ERROR size == 0";
|
std::cerr << "p3Service::send() ERROR size == 0";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* can't convert! */
|
/* can't convert! */
|
||||||
delete si;
|
delete si;
|
||||||
@ -168,20 +166,18 @@ int p3FastService::sendItem(RsItem *si)
|
|||||||
RsRawItem *raw = new RsRawItem(si->PacketId(), size);
|
RsRawItem *raw = new RsRawItem(si->PacketId(), size);
|
||||||
if (!rsSerialiser->serialise(si, raw->getRawData(), &size))
|
if (!rsSerialiser->serialise(si, raw->getRawData(), &size))
|
||||||
{
|
{
|
||||||
#ifdef SERV_DEBUG
|
|
||||||
std::cerr << "p3Service::send() ERROR serialise failed";
|
std::cerr << "p3Service::send() ERROR serialise failed";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
|
||||||
delete raw;
|
delete raw;
|
||||||
raw = NULL;
|
raw = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((raw) && (size != raw->getRawLength()))
|
if ((raw) && (size != raw->getRawLength()))
|
||||||
{
|
{
|
||||||
#ifdef SERV_DEBUG
|
|
||||||
std::cerr << "p3Service::send() ERROR serialise size mismatch";
|
std::cerr << "p3Service::send() ERROR serialise size mismatch";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
|
||||||
delete raw;
|
delete raw;
|
||||||
raw = NULL;
|
raw = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user