From a570f66e79f8453f0c13eb4aa825b76deba5625b Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 30 Jul 2013 14:47:41 +0000 Subject: [PATCH] no need to drop an entire config file when a single item cannot be serialized. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6548 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/pqistore.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libretroshare/src/pqi/pqistore.cc b/libretroshare/src/pqi/pqistore.cc index 0726ad7be..548f4e830 100644 --- a/libretroshare/src/pqi/pqistore.cc +++ b/libretroshare/src/pqi/pqistore.cc @@ -383,12 +383,11 @@ bool pqiSSLstore::encryptedSendItems(const std::list& rsItemList) for(it = rsItemList.begin(); it != rsItemList.end(); it++) { sizeItem = rsSerialiser->size(*it); - if(!rsSerialiser->serialise(*it, (data+offset),&sizeItem)) - { - std::cerr << "(EE) pqiSSLstore::encryptedSendItems(): One item did not serialize. sizeItem=" << sizeItem << ". Dropping the entire file. " << std::endl; - return false; - } - offset += sizeItem; + + if(rsSerialiser->serialise(*it, (data+offset),&sizeItem)) + offset += sizeItem; + else + std::cerr << "(EE) pqiSSLstore::encryptedSendItems(): One item did not serialize. The item is probably unknown from the serializer. Dropping the item. " << std::endl; if (!(bio_flags & BIN_FLAGS_NO_DELETE)) delete *it;