diff --git a/libretroshare/src/serialiser/rsgxsupdateitems.cc b/libretroshare/src/serialiser/rsgxsupdateitems.cc index 60f637f06..26bcff9c3 100644 --- a/libretroshare/src/serialiser/rsgxsupdateitems.cc +++ b/libretroshare/src/serialiser/rsgxsupdateitems.cc @@ -325,8 +325,8 @@ RsGxsGrpUpdateItem* RsGxsUpdateSerialiser::deserialGxsGrpUpddate(void* data, /* skip the header */ offset += 8; - ok &= getRawUInt32(data, *size, &offset, &(item->grpUpdateTS)); ok &= GetTlvString(data, *size, &offset, TLV_TYPE_STR_PEERID, item->peerId); + ok &= getRawUInt32(data, *size, &offset, &(item->grpUpdateTS)); if (offset != rssize) { @@ -482,7 +482,7 @@ bool RsGxsUpdateSerialiser::serialiseGxsMsgUpdate(RsGxsMsgUpdateItem* item, for(; cit != msgUpdateTS.end(); cit++) { - ok &= SetTlvString(data, *size, &offset, TLV_TYPE_STR_PEERID, cit->first); + ok &= SetTlvString(data, *size, &offset, TLV_TYPE_STR_GROUPID, cit->first); ok &= setRawUInt32(data, *size, &offset, cit->second); } @@ -599,7 +599,7 @@ RsGxsMsgUpdateItem* RsGxsUpdateSerialiser::deserialGxsMsgUpdate(void* data, std::map& msgUpdateItem = item->msgUpdateTS; std::string grpId; uint32_t updateTS; - for(uint32_t i; i < numUpdateItems; i++) + for(uint32_t i = 0; i < numUpdateItems; i++) { ok &= GetTlvString(data, *size, &offset, TLV_TYPE_STR_GROUPID, grpId); diff --git a/libretroshare/src/tests/serialiser/rsgxsupdateitem_test.cc b/libretroshare/src/tests/serialiser/rsgxsupdateitem_test.cc index 395e5b7c3..aa858daf7 100644 --- a/libretroshare/src/tests/serialiser/rsgxsupdateitem_test.cc +++ b/libretroshare/src/tests/serialiser/rsgxsupdateitem_test.cc @@ -15,7 +15,7 @@ RsSerialType* init_item(RsGxsGrpUpdateItem& i) i.clear(); i.grpUpdateTS = rand()%2424; randString(SHORT_STR, i.peerId); - return new RsGxsUpdateSerialiser(0); + return new RsGxsUpdateSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM); } RsSerialType* init_item(RsGxsMsgUpdateItem& i) @@ -31,7 +31,7 @@ RsSerialType* init_item(RsGxsMsgUpdateItem& i) i.msgUpdateTS.insert(std::make_pair(peer, rand()%45)); } - return new RsGxsUpdateSerialiser(0); + return new RsGxsUpdateSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM); } RsSerialType* init_item(RsGxsServerGrpUpdateItem& i) @@ -39,7 +39,7 @@ RsSerialType* init_item(RsGxsServerGrpUpdateItem& i) i.clear(); i.grpUpdateTS = rand()%2424; - return new RsGxsUpdateSerialiser(0); + return new RsGxsUpdateSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM); } RsSerialType* init_item(RsGxsServerMsgUpdateItem& i) @@ -47,7 +47,7 @@ RsSerialType* init_item(RsGxsServerMsgUpdateItem& i) i.clear(); randString(SHORT_STR, i.grpId); i.msgUpdateTS = rand()%4252; - return new RsGxsUpdateSerialiser(0); + return new RsGxsUpdateSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM); } bool operator ==(const RsGxsGrpUpdateItem& l, const RsGxsGrpUpdateItem& r) diff --git a/libretroshare/src/tests/serialiser/rsnxsitems_test.cc b/libretroshare/src/tests/serialiser/rsnxsitems_test.cc index 16cc020a9..b2dab65e9 100644 --- a/libretroshare/src/tests/serialiser/rsnxsitems_test.cc +++ b/libretroshare/src/tests/serialiser/rsnxsitems_test.cc @@ -39,7 +39,7 @@ RsSerialType* init_item(RsNxsSyncGrp& rsg) { rsg.clear(); rsg.flag = RsNxsSyncGrp::FLAG_USE_SYNC_HASH; - rsg.syncAge = rand()%2423; + rsg.createdSince = rand()%2423; randString(3124,rsg.syncHash); return new RsNxsSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM); @@ -50,7 +50,7 @@ RsSerialType* init_item(RsNxsSyncMsg& rsgm) rsgm.clear(); rsgm.flag = RsNxsSyncMsg::FLAG_USE_SYNC_HASH; - rsgm.syncAge = rand()%24232; + rsgm.createdSince = rand()%24232; rsgm.transactionNumber = rand()%23; randString(SHORT_STR, rsgm.grpId); randString(SHORT_STR, rsgm.syncHash); @@ -120,7 +120,7 @@ bool operator==(const RsNxsSyncGrp& l, const RsNxsSyncGrp& r) if(l.syncHash != r.syncHash) return false; if(l.flag != r.flag) return false; - if(l.syncAge != r.syncAge) return false; + if(l.createdSince != r.createdSince) return false; if(l.transactionNumber != r.transactionNumber) return false; return true; @@ -130,7 +130,7 @@ bool operator==(const RsNxsSyncMsg& l, const RsNxsSyncMsg& r) { if(l.flag != r.flag) return false; - if(l.syncAge != r.syncAge) return false; + if(l.createdSince != r.createdSince) return false; if(l.syncHash != r.syncHash) return false; if(l.grpId != r.grpId) return false; if(l.transactionNumber != r.transactionNumber) return false;