mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 10:35:22 -04:00
JSON API for /rsFiles/FileClearCompleted
This commit is contained in:
parent
81d23fa607
commit
db0a22a226
2 changed files with 17 additions and 10 deletions
|
@ -1396,25 +1396,25 @@ bool ftController::FileControl(const RsFileHash& hash, uint32_t flags)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ftController::FileClearCompleted()
|
||||
bool ftController::FileClearCompleted()
|
||||
{
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ftController::FileClearCompleted()" <<std::endl;
|
||||
#endif
|
||||
{
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
RS_STACK_MUTEX(ctrlMutex);
|
||||
|
||||
for(std::map<RsFileHash, ftFileControl*>::iterator it(mCompleted.begin());it!=mCompleted.end();++it)
|
||||
delete it->second ;
|
||||
for(auto it(mCompleted.begin()); it != mCompleted.end(); ++it)
|
||||
delete it->second;
|
||||
|
||||
mCompleted.clear();
|
||||
|
||||
IndicateConfigChanged();
|
||||
} /******* UNLOCKED ********/
|
||||
}
|
||||
|
||||
RsServer::notify()->notifyDownloadCompleteCount(0);
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* get Details of File Transfers */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue