added functionnality to complain when a download is initiated over a file already in download, or in the HD

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2055 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-01-16 15:42:26 +00:00
parent fee083e6b8
commit e70e995894
6 changed files with 201 additions and 167 deletions

View file

@ -245,10 +245,13 @@ void ftServer::run()
bool ftServer::FileRequest(std::string fname, std::string hash, uint64_t size, std::string dest, uint32_t flags, std::list<std::string> srcIds)
{
std::cerr << "Requesting " << fname << std::endl ;
// return mFtController->FileRequest(fname, hash, size,
// dest, flags, srcIds);
if(mFtController->alreadyHaveFile(hash))
return false ;
const DwlDetails details(fname, hash, size, dest, flags, srcIds, Normal);
mFtDwlQueue->insertDownload(details);
return true ;
}