mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-29 11:01:22 -04:00
fixed a few things to correct PR403
This commit is contained in:
parent
699b3cf064
commit
10e0254317
8 changed files with 59 additions and 19 deletions
|
@ -532,12 +532,18 @@ bool RsGRouterTransactionAcknItem::serialise(void *data,uint32_t& size) const
|
|||
|
||||
return ok;
|
||||
}
|
||||
bool RsGRouterGenericDataItem::serialise_signed_data(void *data,uint32_t& size) const
|
||||
bool RsGRouterGenericDataItem::serialise_signed_data(void *data,uint32_t size) const
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
uint32_t offset = 0;
|
||||
uint32_t tlvsize = signed_data_size() ;
|
||||
|
||||
if(tlvsize > size)
|
||||
{
|
||||
ok = false;
|
||||
std::cerr << "RsGRouterReceiptItem::serialisedata() size error! Not enough size in supplied container." << std::endl;
|
||||
}
|
||||
|
||||
/* add mandatory parts first */
|
||||
ok &= setRawUInt64(data, tlvsize, &offset, routing_id);
|
||||
|
@ -580,12 +586,18 @@ bool RsGRouterSignedReceiptItem::serialise(void *data,uint32_t& size) const
|
|||
|
||||
return ok;
|
||||
}
|
||||
bool RsGRouterSignedReceiptItem::serialise_signed_data(void *data,uint32_t& size) const
|
||||
bool RsGRouterSignedReceiptItem::serialise_signed_data(void *data,uint32_t size) const
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
uint32_t offset=0;
|
||||
uint32_t tlvsize = signed_data_size() ;
|
||||
|
||||
if(tlvsize > size)
|
||||
{
|
||||
ok = false;
|
||||
std::cerr << "RsGRouterReceiptItem::serialisedata() size error! Not enough size in supplied container." << std::endl;
|
||||
}
|
||||
|
||||
/* add mandatory parts first */
|
||||
ok &= setRawUInt64(data, tlvsize, &offset, routing_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue