From f961dc90668a55fe6420a1a8adce279caf24f2fd Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 2 Oct 2013 20:09:42 +0000 Subject: [PATCH] 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 --- libretroshare/src/services/p3service.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libretroshare/src/services/p3service.cc b/libretroshare/src/services/p3service.cc index 9254f9f8d..eaa01ae02 100644 --- a/libretroshare/src/services/p3service.cc +++ b/libretroshare/src/services/p3service.cc @@ -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; }