mirror of
https://github.com/transmission/transmission
synced 2024-12-25 17:17:31 +00:00
(trunk, libT) #4638 "Transmission sends an initial 'stopped' event when adding a torrent via RPC" -- fixed.
This commit is contained in:
parent
da2afd01ef
commit
8fb80f5132
1 changed files with 6 additions and 6 deletions
|
@ -1720,6 +1720,7 @@ torrentRecheckDoneCB( tr_torrent * tor )
|
|||
static void
|
||||
verifyTorrent( void * vtor )
|
||||
{
|
||||
bool startAfter;
|
||||
tr_torrent * tor = vtor;
|
||||
|
||||
tr_sessionLock( tor->session );
|
||||
|
@ -1727,13 +1728,12 @@ verifyTorrent( void * vtor )
|
|||
/* if the torrent's already being verified, stop it */
|
||||
tr_verifyRemove( tor );
|
||||
|
||||
/* if the torrent's running, stop it & set the restart-after-verify flag */
|
||||
if( tor->startAfterVerify || tor->isRunning ) {
|
||||
/* don't clobber isStopping */
|
||||
const bool startAfter = tor->isStopping ? false : true;
|
||||
startAfter = (tor->isRunning || tor->startAfterVerify) && !tor->isStopping;
|
||||
|
||||
if( tor->isRunning )
|
||||
tr_torrentStop( tor );
|
||||
|
||||
tor->startAfterVerify = startAfter;
|
||||
}
|
||||
|
||||
if( setLocalErrorIfFilesDisappeared( tor ) )
|
||||
tor->startAfterVerify = false;
|
||||
|
|
Loading…
Reference in a new issue