mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
addednew flag for anonymous search. Merged the two browsable flags in one single flag.
This commit is contained in:
parent
5b9ef04358
commit
e8e054eeae
14 changed files with 99 additions and 128 deletions
|
@ -1611,7 +1611,7 @@ bool ftController::FileDetails(const RsFileHash &hash, FileInfo &info)
|
|||
info.queue_position = it->second->mQueuePosition ;
|
||||
|
||||
if(it->second->mFlags & RS_FILE_REQ_ANONYMOUS_ROUTING)
|
||||
info.storage_permission_flags |= DIR_FLAGS_NETWORK_WIDE_OTHERS ; // file being downloaded anonymously are always anonymously available.
|
||||
info.storage_permission_flags |= DIR_FLAGS_ANONYMOUS_DOWNLOAD ; // file being downloaded anonymously are always anonymously available.
|
||||
|
||||
/* get list of sources from transferModule */
|
||||
std::list<RsPeerId> peerIds;
|
||||
|
|
|
@ -350,9 +350,10 @@ bool ftExtraList::search(const RsFileHash &hash, FileSearchFlags /*hintflags*
|
|||
|
||||
// Now setup the file storage flags so that the client can know how to handle permissions
|
||||
//
|
||||
info.storage_permission_flags = DIR_FLAGS_BROWSABLE_OTHERS ;
|
||||
#warning make sure this is right
|
||||
info.storage_permission_flags = FileStorageFlags(0) ;//DIR_FLAGS_BROWSABLE_OTHERS ;
|
||||
|
||||
if(info.transfer_info_flags & RS_FILE_REQ_ANONYMOUS_ROUTING) info.storage_permission_flags |= DIR_FLAGS_NETWORK_WIDE_OTHERS ;
|
||||
if(info.transfer_info_flags & RS_FILE_REQ_ANONYMOUS_ROUTING) info.storage_permission_flags |= DIR_FLAGS_ANONYMOUS_DOWNLOAD ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -644,7 +644,7 @@ int ftServer::RequestDirDetails(void *ref, DirDetails &details, FileSearchFlags
|
|||
{
|
||||
return mFileDatabase->RequestDirDetails(ref,details,flags) ;
|
||||
}
|
||||
uint32_t ftServer::getType(void *ref, FileSearchFlags flags)
|
||||
uint32_t ftServer::getType(void *ref, FileSearchFlags /* flags */)
|
||||
{
|
||||
return mFileDatabase->getType(ref) ;
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ bool ftServer::shareDownloadDirectory(bool share)
|
|||
/* Share */
|
||||
SharedDirInfo inf ;
|
||||
inf.filename = mFtController->getDownloadDirectory();
|
||||
inf.shareflags = DIR_FLAGS_NETWORK_WIDE_OTHERS ;
|
||||
inf.shareflags = DIR_FLAGS_ANONYMOUS_DOWNLOAD ;
|
||||
|
||||
return addSharedDirectory(inf);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue