1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

(trunk, libT) #4638 "Transmission sends an initial 'stopped' event when adding a torrent via RPC" -- fixed.

This commit is contained in:
Jordan Lee 2012-10-15 03:11:16 +00:00
parent da2afd01ef
commit 8fb80f5132

View file

@ -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;
}
tor->startAfterVerify = startAfter;
if( setLocalErrorIfFilesDisappeared( tor ) )
tor->startAfterVerify = false;