mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #2323 from csoler/v0.6-BugFixing_10
Attempt to fix propagation of circle-restricted grps when membership is changed.
This commit is contained in:
commit
992b1ef066
@ -2175,15 +2175,19 @@ void RsGxsNetService::updateServerSyncTS()
|
|||||||
#ifdef NXS_NET_DEBUG_0
|
#ifdef NXS_NET_DEBUG_0
|
||||||
GXSNETDEBUG__G(mit->first) << " Group " << mit->first << " is conditionned to circle " << mit->second->mCircleId << ". local Grp TS=" << time(NULL) - mGrpServerUpdate.grpUpdateTS << " secs ago, circle grp server update TS=" << time(NULL) - circle_group_server_ts << " secs ago";
|
GXSNETDEBUG__G(mit->first) << " Group " << mit->first << " is conditionned to circle " << mit->second->mCircleId << ". local Grp TS=" << time(NULL) - mGrpServerUpdate.grpUpdateTS << " secs ago, circle grp server update TS=" << time(NULL) - circle_group_server_ts << " secs ago";
|
||||||
#endif
|
#endif
|
||||||
|
// We use a max here between grp and msg TS because membership is driven by invite list (grp data) crossed with
|
||||||
|
// membership requests messages (msg data).
|
||||||
|
|
||||||
if(circle_group_server_ts > mGrpServerUpdate.grpUpdateTS)
|
auto circle_membership_ts = std::max(circle_group_server_ts,circle_msg_server_ts);
|
||||||
|
|
||||||
|
if(circle_membership_ts > mGrpServerUpdate.grpUpdateTS)
|
||||||
{
|
{
|
||||||
#ifdef NXS_NET_DEBUG_0
|
#ifdef NXS_NET_DEBUG_0
|
||||||
GXSNETDEBUG__G(mit->first) << " - Updating local Grp Server update TS to follow changes in circles." << std::endl;
|
GXSNETDEBUG__G(mit->first) << " - Updating local Grp Server update TS to follow changes in circles." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RS_STACK_MUTEX(mNxsMutex) ;
|
RS_STACK_MUTEX(mNxsMutex) ;
|
||||||
mGrpServerUpdate.grpUpdateTS = circle_group_server_ts ;
|
mGrpServerUpdate.grpUpdateTS = circle_membership_ts ;
|
||||||
}
|
}
|
||||||
#ifdef NXS_NET_DEBUG_0
|
#ifdef NXS_NET_DEBUG_0
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user