From 6e8679ff909e026dc349ec9e1fc7ee349b55a7bc Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 28 Aug 2013 21:26:27 +0000 Subject: [PATCH] automatically put paused files at end of queue (Patch from Phenom) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6642 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/ft/ftcontroller.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index 9ebcbf680..f5866177b 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -427,8 +427,8 @@ void ftController::checkDownloadQueue() for(std::map::const_iterator it(mDownloads.begin());it!=mDownloads.end() && nb_moved <= _max_active_downloads;++it) if( it->second->mState != ftFileControl::QUEUED - && it->second->mState != ftFileControl::PAUSED - && now > it->second->mCreator->lastRecvTimeStamp() + (time_t)MAX_TIME_INACTIVE_REQUEUED) + && (it->second->mState == ftFileControl::PAUSED + || now > it->second->mCreator->lastRecvTimeStamp() + (time_t)MAX_TIME_INACTIVE_REQUEUED)) { #ifdef DEBUG_DWLQUEUE std::cerr << " - Inactive file " << it->second->mName << " at position " << it->second->mQueuePosition << " moved to end of the queue. mState=" << it->second->mState << ", time lapse=" << now - it->second->mCreator->lastRecvTimeStamp() << std::endl ;