switched RsNxsItems to new serialization

This commit is contained in:
csoler 2017-04-27 14:16:57 +02:00
parent f6e59f7dee
commit 3c20a85335
3 changed files with 223 additions and 235 deletions

View file

@ -3500,10 +3500,10 @@ bool RsGxsNetService::encryptSingleNxsItem(RsNxsItem *item, const RsGxsCircleId&
#ifdef NXS_NET_DEBUG_7
GXSNETDEBUG_P_ (item->PeerId()) << " Encrypting..." << std::endl;
#endif
uint32_t size = item->serial_size() ;
uint32_t size = RsNxsSerialiser(mServType).size(item) ;
RsTemporaryMemory tempmem( size ) ;
if(!item->serialise(tempmem,size))
if(!RsNxsSerialiser(mServType).serialise(item,tempmem,&size))
{
std::cerr << " (EE) Cannot serialise item. Something went wrong." << std::endl;
status = RS_NXS_ITEM_ENCRYPTION_STATUS_SERIALISATION_ERROR ;
@ -3530,7 +3530,7 @@ bool RsGxsNetService::encryptSingleNxsItem(RsNxsItem *item, const RsGxsCircleId&
enc_item->transactionNumber = item->transactionNumber ;
enc_item->PeerId(item->PeerId()) ;
encrypted_item = enc_item ;
encrypted_item = enc_item ;
#ifdef NXS_NET_DEBUG_7
GXSNETDEBUG_P_(item->PeerId()) << " encrypted item of size " << encrypted_len << std::endl;
#endif