mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed 2 comments in GXS net service
This commit is contained in:
parent
e895b6b357
commit
2ed983026d
@ -1966,6 +1966,8 @@ void RsGxsNetService::updateServerSyncTS()
|
|||||||
time_t circle_msg_server_ts ;
|
time_t circle_msg_server_ts ;
|
||||||
|
|
||||||
// This call needs to be off-mutex, because of self-restricted circles.
|
// This call needs to be off-mutex, because of self-restricted circles.
|
||||||
|
// Normally we should update as a function of MsgServerUpdateTS and the mRecvTS of the circle, not the global grpServerTS.
|
||||||
|
// But grpServerTS is easier to get since it does not require a db access. So we trade the real call for this cheap and conservative call.
|
||||||
|
|
||||||
if(mCircles->getLocalCircleServerUpdateTS(mit->second->mCircleId,circle_group_server_ts,circle_msg_server_ts))
|
if(mCircles->getLocalCircleServerUpdateTS(mit->second->mCircleId,circle_group_server_ts,circle_msg_server_ts))
|
||||||
{
|
{
|
||||||
@ -3739,10 +3741,7 @@ void RsGxsNetService::locked_pushGrpRespFromList(std::list<RsNxsItem*>& respList
|
|||||||
bool RsGxsNetService::locked_CanReceiveUpdate(const RsNxsSyncGrpReqItem *item)
|
bool RsGxsNetService::locked_CanReceiveUpdate(const RsNxsSyncGrpReqItem *item)
|
||||||
{
|
{
|
||||||
// Do we have new updates for this peer?
|
// Do we have new updates for this peer?
|
||||||
|
// The received TS is in our own clock, but send to us by the friend.
|
||||||
// This is one of the few places where we compare a local time stamp (mGrpServerUpdateItem->grpUpdateTS) to a peer's time stamp.
|
|
||||||
// Because this is the global modification time for groups, async-ed computers will eventually figure out that their data needs
|
|
||||||
// to be synced.
|
|
||||||
|
|
||||||
#ifdef NXS_NET_DEBUG_0
|
#ifdef NXS_NET_DEBUG_0
|
||||||
GXSNETDEBUG_P_(item->PeerId()) << " local modification time stamp: " << std::dec<< time(NULL) - mGrpServerUpdate.grpUpdateTS << " secs ago. Update sent: " <<
|
GXSNETDEBUG_P_(item->PeerId()) << " local modification time stamp: " << std::dec<< time(NULL) - mGrpServerUpdate.grpUpdateTS << " secs ago. Update sent: " <<
|
||||||
|
Loading…
Reference in New Issue
Block a user