ported v0.5.0 commits 2561,2562 and 2574 to trunk

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2575 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-03-17 15:34:36 +00:00
parent 12a0f45625
commit f8d6590952
10 changed files with 134 additions and 90 deletions

View file

@ -727,6 +727,7 @@ bool ftController::completeFile(std::string hash)
if (fc->mCreator)
{
fc->mCreator->closeFile() ;
delete fc->mCreator;
fc->mCreator = NULL;
}
@ -929,6 +930,11 @@ bool ftController::FileRequest(std::string fname, std::string hash,
uint64_t size, std::string dest, uint32_t flags,
std::list<std::string> &srcIds)
{
/* check if we have the file */
if(alreadyHaveFile(hash))
return false ;
if(size == 0) // we treat this special case because
{
/* if no destpath - send to download directory */
@ -967,11 +973,6 @@ bool ftController::FileRequest(std::string fname, std::string hash,
}
}
/* check if we have the file */
if(alreadyHaveFile(hash))
return true ;
FileInfo info;
std::list<std::string>::iterator it;
std::list<TransferInfo>::iterator pit;