mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed the bug that caused unwanted direct downloads. A check was missing in ftController::FileRequest
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6911 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
75c178082f
commit
830404a25e
@ -1179,27 +1179,28 @@ bool ftController::FileRequest(const std::string& fname, const std::string& has
|
||||
*/
|
||||
|
||||
for(it = srcIds.begin(); it != srcIds.end(); it++)
|
||||
{
|
||||
uint32_t i, j;
|
||||
if ((dit->second)->mTransfer->getPeerState(*it, i, j))
|
||||
if(rsPeers->servicePermissionFlags_sslid(*it) & RS_SERVICE_PERM_DIRECT_DL)
|
||||
{
|
||||
uint32_t i, j;
|
||||
if ((dit->second)->mTransfer->getPeerState(*it, i, j))
|
||||
{
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ftController::FileRequest() Peer Existing";
|
||||
std::cerr << "ftController::FileRequest() Peer Existing";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
continue; /* already added peer */
|
||||
}
|
||||
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ftController::FileRequest() Adding Peer: " << *it;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
continue; /* already added peer */
|
||||
(dit->second)->mTransfer->addFileSource(*it);
|
||||
setPeerState(dit->second->mTransfer, *it, rate, mLinkMgr->isOnline(*it));
|
||||
|
||||
IndicateConfigChanged(); /* new peer for transfer -> save */
|
||||
}
|
||||
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ftController::FileRequest() Adding Peer: " << *it;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
(dit->second)->mTransfer->addFileSource(*it);
|
||||
setPeerState(dit->second->mTransfer, *it, rate, mLinkMgr->isOnline(*it));
|
||||
|
||||
IndicateConfigChanged(); /* new peer for transfer -> save */
|
||||
}
|
||||
|
||||
if (srcIds.size() == 0)
|
||||
{
|
||||
#ifdef CONTROL_DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user