mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-21 12:54:26 -04:00
merged upstream/master
This commit is contained in:
commit
25565a7ecd
19 changed files with 393 additions and 159 deletions
|
@ -390,8 +390,14 @@ void p3GxsTrans::GxsTransIntegrityCleanupThread::run()
|
|||
|
||||
RS_STACK_MUTEX(mMtx) ;
|
||||
mMsgToDel = msgsToDel ;
|
||||
mDone = true;
|
||||
}
|
||||
|
||||
bool p3GxsTrans::GxsTransIntegrityCleanupThread::isDone()
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx) ;
|
||||
return mDone ;
|
||||
}
|
||||
void p3GxsTrans::service_tick()
|
||||
{
|
||||
GxsTokenQueue::checkRequests();
|
||||
|
@ -417,7 +423,7 @@ void p3GxsTrans::service_tick()
|
|||
|
||||
// now grab collected messages to delete
|
||||
|
||||
if(mCleanupThread != NULL && !mCleanupThread->isRunning())
|
||||
if(mCleanupThread != NULL && mCleanupThread->isDone())
|
||||
{
|
||||
GxsMsgReq msgToDel ;
|
||||
|
||||
|
@ -426,7 +432,8 @@ void p3GxsTrans::service_tick()
|
|||
if(!msgToDel.empty())
|
||||
{
|
||||
std::cerr << "p3GxsTrans::service_tick(): deleting messages." << std::endl;
|
||||
getDataStore()->removeMsgs(msgToDel);
|
||||
uint32_t token ;
|
||||
deleteMsgs(token,msgToDel);
|
||||
}
|
||||
|
||||
RS_STACK_MUTEX(mPerUserStatsMutex);
|
||||
|
@ -575,6 +582,7 @@ void p3GxsTrans::notifyChanges(std::vector<RsGxsNotify*>& changes)
|
|||
}
|
||||
}
|
||||
}
|
||||
RsGxsIfaceHelper::receiveChanges(changes);
|
||||
}
|
||||
|
||||
uint32_t p3GxsTrans::AuthenPolicy()
|
||||
|
|
|
@ -291,7 +291,7 @@ private:
|
|||
enum CheckState { CheckStart, CheckChecking };
|
||||
|
||||
public:
|
||||
GxsTransIntegrityCleanupThread(RsGeneralDataService *const dataService): mDs(dataService),mMtx("GxsTransIntegrityCheck") {}
|
||||
GxsTransIntegrityCleanupThread(RsGeneralDataService *const dataService): mDs(dataService),mMtx("GxsTransIntegrityCheck") { mDone=false;}
|
||||
|
||||
bool isDone();
|
||||
void run();
|
||||
|
@ -307,6 +307,7 @@ private:
|
|||
|
||||
GxsMsgReq mMsgToDel ;
|
||||
std::map<RsGxsId,MsgSizeCount> total_message_size_and_count;
|
||||
bool mDone ;
|
||||
};
|
||||
|
||||
// Overloaded from RsGenExchange.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue