JSON API for /rsFiles/FileClearCompleted

This commit is contained in:
Gioacchino Mazzurco 2018-12-06 20:46:44 +01:00
parent 81d23fa607
commit db0a22a226
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
2 changed files with 17 additions and 10 deletions

View file

@ -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 */