mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 08:29:26 -05:00
Merge pull request #1984 from G10h4ck/already_have_files_extra
RsFiles::alreadyHaveFile look into extra list too
This commit is contained in:
commit
3f7bfdfbb5
@ -1424,9 +1424,15 @@ int p3FileDatabase::SearchBoolExp(RsRegularExpression::Expression *exp, std::lis
|
|||||||
return !results.empty() ;
|
return !results.empty() ;
|
||||||
|
|
||||||
}
|
}
|
||||||
bool p3FileDatabase::search(const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const
|
|
||||||
|
bool p3FileDatabase::search(
|
||||||
|
const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const
|
||||||
{
|
{
|
||||||
RS_STACK_MUTEX(mFLSMtx) ;
|
RS_STACK_MUTEX(mFLSMtx);
|
||||||
|
|
||||||
|
if( (hintflags & RS_FILE_HINTS_EXTRA) &&
|
||||||
|
mExtraFiles->search(hash, hintflags, info) )
|
||||||
|
return true;
|
||||||
|
|
||||||
if(hintflags & RS_FILE_HINTS_LOCAL)
|
if(hintflags & RS_FILE_HINTS_LOCAL)
|
||||||
{
|
{
|
||||||
|
@ -293,7 +293,8 @@ bool ftServer::getFileData(const RsFileHash& hash, uint64_t offset, uint32_t& re
|
|||||||
|
|
||||||
bool ftServer::alreadyHaveFile(const RsFileHash& hash, FileInfo &info)
|
bool ftServer::alreadyHaveFile(const RsFileHash& hash, FileInfo &info)
|
||||||
{
|
{
|
||||||
return mFileDatabase->search(hash, RS_FILE_HINTS_LOCAL, info);
|
return mFileDatabase->search(
|
||||||
|
hash, RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_LOCAL, info );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ftServer::FileRequest(
|
bool ftServer::FileRequest(
|
||||||
|
Loading…
Reference in New Issue
Block a user