mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-23 05:44:45 -04:00
Fixed serialiser bug in RsTlvList
Switched to proper Ids in gxsCircle gxsId items. Fixed up Config serialiser. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7218 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
acba05b780
commit
0dbe55bd05
12 changed files with 101 additions and 170 deletions
|
@ -169,7 +169,7 @@ uint32_t RsGxsIdSerialiser::sizeGxsIdGroupItem(RsGxsIdGroupItem *item)
|
|||
const RsGxsIdGroup& group = item->group;
|
||||
uint32_t s = 8; // header
|
||||
|
||||
s += GetTlvStringSize(group.mPgpIdHash);
|
||||
s += Sha1CheckSum::SIZE_IN_BYTES;
|
||||
s += GetTlvStringSize(group.mPgpIdSign);
|
||||
|
||||
RsTlvStringSetRef set(TLV_TYPE_RECOGNSET, item->group.mRecognTags);
|
||||
|
@ -203,7 +203,7 @@ bool RsGxsIdSerialiser::serialiseGxsIdGroupItem(RsGxsIdGroupItem *item, void *da
|
|||
offset += 8;
|
||||
|
||||
/* GxsIdGroupItem */
|
||||
ok &= SetTlvString(data, tlvsize, &offset, TLV_TYPE_STR_HASH_SHA1, item->group.mPgpIdHash);
|
||||
ok &= item->group.mPgpIdHash.serialise(data, tlvsize, offset);
|
||||
ok &= SetTlvString(data, tlvsize, &offset, TLV_TYPE_STR_SIGN, item->group.mPgpIdSign);
|
||||
|
||||
RsTlvStringSetRef set(TLV_TYPE_RECOGNSET, item->group.mRecognTags);
|
||||
|
@ -263,7 +263,7 @@ RsGxsIdGroupItem* RsGxsIdSerialiser::deserialiseGxsIdGroupItem(void *data, uint3
|
|||
/* skip the header */
|
||||
offset += 8;
|
||||
|
||||
ok &= GetTlvString(data, rssize, &offset, TLV_TYPE_STR_HASH_SHA1, item->group.mPgpIdHash);
|
||||
ok &= item->group.mPgpIdHash.deserialise(data, rssize, offset);
|
||||
ok &= GetTlvString(data, rssize, &offset, TLV_TYPE_STR_SIGN, item->group.mPgpIdSign);
|
||||
|
||||
RsTlvStringSetRef set(TLV_TYPE_RECOGNSET, item->group.mRecognTags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue