mirror of
https://github.com/transmission/transmission
synced 2025-02-04 21:43:03 +00:00
Fix issue #413 "Starting a Torrent when one is checking make it queue after it" reported by tiennou
This commit is contained in:
parent
df50cbcabf
commit
41e9939317
1 changed files with 19 additions and 10 deletions
|
@ -377,8 +377,16 @@ recheckThreadFunc( void * unused UNUSED )
|
|||
void
|
||||
tr_ioRecheckAdd( tr_torrent * tor,
|
||||
tr_recheck_done_cb recheck_done_cb )
|
||||
{
|
||||
if( !tr_bitfieldCountTrueBits( tor->uncheckedPieces ) )
|
||||
{
|
||||
/* doesn't need to be checked... */
|
||||
recheck_done_cb( tor );
|
||||
}
|
||||
else
|
||||
{
|
||||
struct recheck_node * node;
|
||||
|
||||
node = tr_new( struct recheck_node, 1 );
|
||||
node->torrent = tor;
|
||||
node->recheck_done_cb = recheck_done_cb;
|
||||
|
@ -390,6 +398,7 @@ tr_ioRecheckAdd( tr_torrent * tor,
|
|||
recheckThread = tr_threadNew( recheckThreadFunc, NULL, "recheckThreadFunc" );
|
||||
tr_lockUnlock( getRecheckLock( ) );
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
compareRecheckByTorrent( const void * va, const void * vb )
|
||||
|
|
Loading…
Reference in a new issue