mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Removed unnecessary select of groups in RsGxsNetService::locked_genReqGrpTransaction.
This commit is contained in:
parent
753846beaf
commit
4d7f92ecbe
@ -2159,6 +2159,9 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr)
|
||||
std::cerr << "locked_genReqGrpTransaction(): " << std::endl;
|
||||
#endif
|
||||
|
||||
std::map<RsGxsGroupId, RsGxsGrpMetaData*> grpMetaMap;
|
||||
std::map<RsGxsGroupId, RsGxsGrpMetaData*>::const_iterator metaIter;
|
||||
|
||||
std::list<RsNxsSyncGrpItem*> grpItemL;
|
||||
std::list<RsNxsItem*>::iterator lit = tr->mItems.begin();
|
||||
|
||||
@ -2168,6 +2171,7 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr)
|
||||
if(item)
|
||||
{
|
||||
grpItemL.push_back(item);
|
||||
grpMetaMap[item->grpId] = NULL;
|
||||
}else
|
||||
{
|
||||
#ifdef NXS_NET_DEBUG
|
||||
@ -2177,8 +2181,11 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr)
|
||||
}
|
||||
}
|
||||
|
||||
std::map<RsGxsGroupId, RsGxsGrpMetaData*> grpMetaMap;
|
||||
std::map<RsGxsGroupId, RsGxsGrpMetaData*>::const_iterator metaIter;
|
||||
if (grpItemL.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mDataStore->retrieveGxsGrpMetaData(grpMetaMap);
|
||||
|
||||
// now do compare and add loop
|
||||
@ -2198,7 +2205,7 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr)
|
||||
metaIter = grpMetaMap.find(grpId);
|
||||
bool haveItem = false;
|
||||
bool latestVersion = false;
|
||||
if (metaIter != grpMetaMap.end())
|
||||
if (metaIter != grpMetaMap.end() && metaIter->second)
|
||||
{
|
||||
haveItem = true;
|
||||
latestVersion = grpSyncItem->publishTs > metaIter->second->mPublishTs;
|
||||
|
Loading…
Reference in New Issue
Block a user