mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 03:22:34 -04:00
moved removal of sources off turtle mutex to avoid cross-lock. Added a closeFile() call when moving files out of the queue
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2523 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
596940400d
commit
c22799b996
3 changed files with 38 additions and 7 deletions
|
@ -550,12 +550,18 @@ void ftController::locked_checkQueueElement(uint32_t pos)
|
|||
if(pos < _max_active_downloads)
|
||||
{
|
||||
_queue[pos]->mState = ftFileControl::DOWNLOADING ;
|
||||
|
||||
if(_queue[pos]->mFlags & RS_FILE_HINTS_NETWORK_WIDE)
|
||||
mTurtle->monitorFileTunnels(_queue[pos]->mName,_queue[pos]->mHash,_queue[pos]->mSize) ;
|
||||
}
|
||||
|
||||
if(pos >= _max_active_downloads && _queue[pos]->mState != ftFileControl::QUEUED)
|
||||
{
|
||||
_queue[pos]->mState = ftFileControl::QUEUED ;
|
||||
_queue[pos]->mCreator->closeFile() ;
|
||||
|
||||
if(_queue[pos]->mFlags & RS_FILE_HINTS_NETWORK_WIDE)
|
||||
mTurtle->stopMonitoringFileTunnels(_queue[pos]->mHash) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue