From 0299691a542ea53f06a4c0d278ebc9a2edc036cf Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 30 Dec 2015 11:14:10 -0500 Subject: [PATCH] removed overkill test that would cause sending updates to peers when no messages are available (thx jo) --- libretroshare/src/gxs/rsgxsnetservice.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index bca154159..a5c3ea720 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -3261,9 +3261,9 @@ bool RsGxsNetService::locked_CanReceiveUpdate(const RsNxsSyncGrp *item) { #ifdef NXS_NET_DEBUG_0 GXSNETDEBUG_P_(item->PeerId()) << " local modification time stamp: " << std::dec<< time(NULL) - mGrpServerUpdateItem->grpUpdateTS << " secs ago. Update sent: " << - ((item->updateTS == 0 || item->updateTS < mGrpServerUpdateItem->grpUpdateTS)?"YES":"NO") << std::endl; + ((item->updateTS < mGrpServerUpdateItem->grpUpdateTS)?"YES":"NO") << std::endl; #endif - return (item->updateTS == 0 || item->updateTS < mGrpServerUpdateItem->grpUpdateTS); + return item->updateTS < mGrpServerUpdateItem->grpUpdateTS; } #ifdef NXS_NET_DEBUG_0 GXSNETDEBUG_P_(item->PeerId()) << " no local time stamp. This will be fixed after updateServerSyncTS(). Not sending for now. " << std::endl; @@ -3589,9 +3589,9 @@ bool RsGxsNetService::locked_CanReceiveUpdate(const RsNxsSyncMsg *item) const RsGxsServerMsgUpdateItem *msui = cit->second; #ifdef NXS_NET_DEBUG_0 - GXSNETDEBUG_PG(item->PeerId(),item->grpId) << " local time stamp: " << std::dec<< time(NULL) - msui->msgUpdateTS << " secs ago. Update sent: " << (item->updateTS == 0 || item->updateTS < msui->msgUpdateTS) ; + GXSNETDEBUG_PG(item->PeerId(),item->grpId) << " local time stamp: " << std::dec<< time(NULL) - msui->msgUpdateTS << " secs ago. Update sent: " << (item->updateTS < msui->msgUpdateTS) ; #endif - return (item->updateTS < msui->msgUpdateTS || item->updateTS == 0) ; + return item->updateTS < msui->msgUpdateTS ; } #ifdef NXS_NET_DEBUG_0 GXSNETDEBUG_PG(item->PeerId(),item->grpId) << " no local time stamp for this grp. " ;