mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-22 20:59:45 -04:00
merged upstream/master
This commit is contained in:
commit
c2ae4fc904
77 changed files with 524 additions and 389 deletions
|
@ -265,7 +265,7 @@ void RsGenExchange::tick()
|
|||
else
|
||||
{
|
||||
mIntegrityCheck = new RsGxsIntegrityCheck(mDataStore,mGixs);
|
||||
mIntegrityCheck->start();
|
||||
mIntegrityCheck->start("gxs integrity");
|
||||
mChecking = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1468,7 +1468,7 @@ bool RsGxsDataAccess::getMsgRelatedInfo(MsgRelatedInfoReq *req)
|
|||
/* first guess is potentially better than Orig (can't be worse!) */
|
||||
time_t latestTs = 0;
|
||||
RsGxsMessageId latestMsgId;
|
||||
RsGxsMsgMetaData* latestMeta;
|
||||
RsGxsMsgMetaData* latestMeta=NULL;
|
||||
|
||||
for(vit_meta = metaV.begin(); vit_meta != metaV.end(); ++vit_meta)
|
||||
{
|
||||
|
|
|
@ -310,17 +310,16 @@ RsGxsNetService::RsGxsNetService(uint16_t servType, RsGeneralDataService *gds,
|
|||
const RsServiceInfo serviceInfo,
|
||||
RsGixsReputation* reputations, RsGcxs* circles, RsGixs *gixs,
|
||||
PgpAuxUtils *pgpUtils, bool grpAutoSync,bool msgAutoSync)
|
||||
: p3ThreadedService(), p3Config(), mTransactionN(0),
|
||||
mObserver(nxsObs),
|
||||
mDataStore(gds),
|
||||
mServType(servType),
|
||||
mGixs(gixs),
|
||||
mTransactionTimeOut(TRANSAC_TIMEOUT), mNetMgr(netMgr), mNxsMutex("RsGxsNetService"),
|
||||
mSyncTs(0), mLastKeyPublishTs(0),mLastCleanRejectedMessages(0), mSYNC_PERIOD(SYNC_PERIOD), mCircles(circles), mReputations(reputations),
|
||||
mPgpUtils(pgpUtils),
|
||||
mGrpAutoSync(grpAutoSync),mAllowMsgSync(msgAutoSync), mGrpServerUpdateItem(NULL),
|
||||
mServiceInfo(serviceInfo)
|
||||
|
||||
: p3ThreadedService(), p3Config(), mTransactionN(0),
|
||||
mObserver(nxsObs), mDataStore(gds),
|
||||
mServType(servType), mTransactionTimeOut(TRANSAC_TIMEOUT),
|
||||
mNetMgr(netMgr), mNxsMutex("RsGxsNetService"),
|
||||
mSyncTs(0), mLastKeyPublishTs(0),
|
||||
mLastCleanRejectedMessages(0), mSYNC_PERIOD(SYNC_PERIOD),
|
||||
mCircles(circles), mGixs(gixs),
|
||||
mReputations(reputations), mPgpUtils(pgpUtils),
|
||||
mGrpAutoSync(grpAutoSync), mAllowMsgSync(msgAutoSync),
|
||||
mGrpServerUpdateItem(NULL), mServiceInfo(serviceInfo)
|
||||
{
|
||||
addSerialType(new RsNxsSerialiser(mServType));
|
||||
mOwnId = mNetMgr->getOwnId();
|
||||
|
@ -1616,7 +1615,6 @@ void RsGxsNetService::recvNxsItemQueue()
|
|||
if(ni->PacketSubType() == RS_PKT_SUBTYPE_NXS_ENCRYPTED_DATA_ITEM)
|
||||
{
|
||||
RsNxsItem *decrypted_item ;
|
||||
uint32_t status ;
|
||||
|
||||
if(decryptSingleNxsItem(dynamic_cast<RsNxsEncryptedDataItem*>(ni),decrypted_item))
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ RsGxsMessageCleanUp::RsGxsMessageCleanUp(RsGeneralDataService* const dataService
|
|||
|
||||
bool RsGxsMessageCleanUp::clean()
|
||||
{
|
||||
int i = 1;
|
||||
uint32_t i = 1;
|
||||
|
||||
time_t now = time(NULL);
|
||||
|
||||
|
@ -281,7 +281,7 @@ bool RsGxsIntegrityCheck::check()
|
|||
std::cerr << " " << *it << std::endl;
|
||||
#endif
|
||||
}
|
||||
int nb_requested_not_in_cache = 0;
|
||||
uint32_t nb_requested_not_in_cache = 0;
|
||||
|
||||
#ifdef GXSUTIL_DEBUG
|
||||
std::cerr << " issuing random get on friends for non existing IDs" << std::endl;
|
||||
|
@ -289,7 +289,7 @@ bool RsGxsIntegrityCheck::check()
|
|||
|
||||
// now request a cache update for them, which triggers downloading from friends, if missing.
|
||||
|
||||
for(;nb_requested_not_in_cache<MAX_GXS_IDS_REQUESTS_NET && gxs_ids.size()>0;)
|
||||
for(;nb_requested_not_in_cache<MAX_GXS_IDS_REQUESTS_NET && !gxs_ids.empty();)
|
||||
{
|
||||
uint32_t n = RSRandom::random_u32() % gxs_ids.size() ;
|
||||
#ifdef GXSUTIL_DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue