1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-02 20:43:51 +00:00

Move the initial fastresume check into the thread that creates the torrent, rather than in the torrent's worker thread

This commit is contained in:
Charles Kerr 2007-07-01 19:10:14 +00:00
parent 0fd3c80c7f
commit bfee506ff4

View file

@ -221,6 +221,7 @@ torrentRealInit( tr_handle_t * h,
tor->error = TR_OK; tor->error = TR_OK;
tor->runStatus = flags & TR_FLAG_PAUSED ? TR_RUN_STOPPED : TR_RUN_RUNNING; tor->runStatus = flags & TR_FLAG_PAUSED ? TR_RUN_STOPPED : TR_RUN_RUNNING;
tor->recheckFlag = tr_ioCheckFiles( tor, TR_RECHECK_FAST );
tr_sharedLock( h->shared ); tr_sharedLock( h->shared );
tor->next = h->torrentList; tor->next = h->torrentList;
@ -948,8 +949,6 @@ torrentThreadLoop ( void * _tor )
tr_lockInit( &checkFilesLock ); tr_lockInit( &checkFilesLock );
} }
tor->recheckFlag = tr_ioCheckFiles( tor, TR_RECHECK_FAST );
/* loop until the torrent is being deleted */ /* loop until the torrent is being deleted */
while( ! ( tor->dieFlag && (tor->runStatus == TR_RUN_STOPPED) ) ) while( ! ( tor->dieFlag && (tor->runStatus == TR_RUN_STOPPED) ) )
{ {