disable update of group messages for IdService since it is unused and takes some bandwidth

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8572 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-06-30 08:12:51 +00:00
parent ebc8bb072c
commit 636635a8b8
3 changed files with 14 additions and 9 deletions

View file

@ -61,13 +61,13 @@ RsGxsNetService::RsGxsNetService(uint16_t servType, RsGeneralDataService *gds,
RsNxsNetMgr *netMgr, RsNxsObserver *nxsObs, RsNxsNetMgr *netMgr, RsNxsObserver *nxsObs,
const RsServiceInfo serviceInfo, const RsServiceInfo serviceInfo,
RsGixsReputation* reputations, RsGcxs* circles, RsGixsReputation* reputations, RsGcxs* circles,
PgpAuxUtils *pgpUtils, bool grpAutoSync) PgpAuxUtils *pgpUtils, bool grpAutoSync,bool msgAutoSync)
: p3ThreadedService(), p3Config(), mTransactionN(0), : p3ThreadedService(), p3Config(), mTransactionN(0),
mObserver(nxsObs), mDataStore(gds), mServType(servType), mObserver(nxsObs), mDataStore(gds), mServType(servType),
mTransactionTimeOut(TRANSAC_TIMEOUT), mNetMgr(netMgr), mNxsMutex("RsGxsNetService"), mTransactionTimeOut(TRANSAC_TIMEOUT), mNetMgr(netMgr), mNxsMutex("RsGxsNetService"),
mSyncTs(0), mLastKeyPublishTs(0), mSYNC_PERIOD(SYNC_PERIOD), mCircles(circles), mReputations(reputations), mSyncTs(0), mLastKeyPublishTs(0), mSYNC_PERIOD(SYNC_PERIOD), mCircles(circles), mReputations(reputations),
mPgpUtils(pgpUtils), mPgpUtils(pgpUtils),
mGrpAutoSync(grpAutoSync), mGrpServerUpdateItem(NULL), mGrpAutoSync(grpAutoSync),mAllowMsgSync(msgAutoSync), mGrpServerUpdateItem(NULL),
mServiceInfo(serviceInfo) mServiceInfo(serviceInfo)
{ {
@ -264,6 +264,9 @@ void RsGxsNetService::syncWithPeers()
sendItem(grp); sendItem(grp);
} }
if(!mAllowMsgSync)
return ;
#ifndef GXS_DISABLE_SYNC_MSGS #ifndef GXS_DISABLE_SYNC_MSGS
typedef std::map<RsGxsGroupId, RsGxsGrpMetaData* > GrpMetaMap; typedef std::map<RsGxsGroupId, RsGxsGrpMetaData* > GrpMetaMap;

View file

@ -88,11 +88,11 @@ public:
*/ */
RsGxsNetService(uint16_t servType, RsGeneralDataService *gds, RsGxsNetService(uint16_t servType, RsGeneralDataService *gds,
RsNxsNetMgr *netMgr, RsNxsNetMgr *netMgr,
RsNxsObserver *nxsObs, // used to be = NULL. RsNxsObserver *nxsObs, // used to be = NULL.
const RsServiceInfo serviceInfo, const RsServiceInfo serviceInfo,
RsGixsReputation* reputations = NULL, RsGcxs* circles = NULL, RsGixsReputation* reputations = NULL, RsGcxs* circles = NULL,
PgpAuxUtils *pgpUtils = NULL, PgpAuxUtils *pgpUtils = NULL,
bool grpAutoSync = true); bool grpAutoSync = true, bool msgAutoSync = true);
virtual ~RsGxsNetService(); virtual ~RsGxsNetService();
@ -483,6 +483,7 @@ private:
RsGixsReputation* mReputations; RsGixsReputation* mReputations;
PgpAuxUtils *mPgpUtils; PgpAuxUtils *mPgpUtils;
bool mGrpAutoSync; bool mGrpAutoSync;
bool mAllowMsgSync;
// need to be verfied // need to be verfied
std::vector<AuthorPending*> mPendingResp; std::vector<AuthorPending*> mPendingResp;

View file

@ -1325,7 +1325,8 @@ int RsServer::StartupRetroShare()
mGxsIdService, mGxsIdService->getServiceInfo(), mGxsIdService, mGxsIdService->getServiceInfo(),
mGxsIdService, mGxsCircles, mGxsIdService, mGxsCircles,
pgpAuxUtils, pgpAuxUtils,
false); // don't synchronise group automatic (need explicit group request) false,false); // don't synchronise group automatic (need explicit group request)
// don't sync messages at all.
mGxsIdService->setNes(gxsid_ns); mGxsIdService->setNes(gxsid_ns);
/**** GxsCircle service ****/ /**** GxsCircle service ****/