mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-05 04:44:19 -04:00
added auto-clean of unused groups when grpAutoSync is enabled (so it does not touch identities)
This commit is contained in:
parent
d2dc632176
commit
b52ab0f542
7 changed files with 70 additions and 11 deletions
|
@ -188,20 +188,17 @@ bool RsGxsIntegrityCheck::check()
|
|||
grpsToDel.push_back(grp->grpId);
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
if(!(grp->metaData->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED))
|
||||
if(!(grp->metaData->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED) && !(grp->metaData->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) && !(grp->metaData->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_PUBLISH))
|
||||
{
|
||||
RsGroupNetworkStats stats ;
|
||||
mGenExchangeClient->getGroupNetworkStats(grp->grpId,stats);
|
||||
|
||||
if(stats.mSuppliers == 0 && stats.mMaxVisibleCount == 0)
|
||||
if(stats.mSuppliers == 0 && stats.mMaxVisibleCount == 0 && stats.mGrpAutoSync)
|
||||
{
|
||||
GXSUTIL_DEBUG() << "Scheduling group \"" << grp->metaData->mGroupName << "\" ID=" << grp->grpId << " for deletion because it has no suppliers not any visible data at friends." << std::endl;
|
||||
#warning Should we do that here? What happens for groups that are normally empty such as identities?
|
||||
GXSUTIL_DEBUG() << "Scheduling group \"" << grp->metaData->mGroupName << "\" ID=" << grp->grpId << " in service " << std::hex << mGenExchangeClient->serviceType() << std::dec << " for deletion because it has no suppliers not any visible data at friends." << std::endl;
|
||||
grpsToDel.push_back(grp->grpId);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
delete grp;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue