Files being downloaded anonymously are declared as available with flag DIR_FLAGS_NETWORK_WIDE_OTHERS. Fixes bug that prevented swarming to happen

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5795 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-11-08 19:47:39 +00:00
parent 5e913feee7
commit 786177eaf0

View File

@ -1623,11 +1623,15 @@ bool ftController::FileDetails(const std::string &hash, FileInfo &info)
/* extract details */ /* extract details */
info.hash = hash; info.hash = hash;
info.fname = it->second->mName; info.fname = it->second->mName;
info.storage_permission_flags.clear() ;
info.transfer_info_flags = it->second->mFlags ; info.transfer_info_flags = it->second->mFlags ;
info.priority = SPEED_NORMAL ; info.priority = SPEED_NORMAL ;
RsDirUtil::removeTopDir(it->second->mDestination, info.path); /* remove fname */ RsDirUtil::removeTopDir(it->second->mDestination, info.path); /* remove fname */
info.queue_position = it->second->mQueuePosition ; 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.
/* get list of sources from transferModule */ /* get list of sources from transferModule */
std::list<std::string> peerIds; std::list<std::string> peerIds;
std::list<std::string>::iterator pit; std::list<std::string>::iterator pit;