(trunk libT) #2520: tor->isRunning is not always saved to .resume file

This commit is contained in:
Charles Kerr 2009-10-21 02:45:49 +00:00
parent eef6177f0a
commit 8d1d91499a
1 changed files with 2 additions and 0 deletions

View File

@ -1341,6 +1341,7 @@ torrentStart( tr_torrent * tor )
tor->peer_id = tr_peerIdNew( );
tor->isRunning = 1;
tr_torrentSetDirty( tor );
tor->preVerifyTotal = tr_cpHaveTotal( &tor->completion );
tr_verifyAdd( tor, checkAndStartCB );
}
@ -1454,6 +1455,7 @@ tr_torrentStop( tr_torrent * tor )
tr_globalLock( tor->session );
tor->isRunning = 0;
tr_torrentSetDirty( tor );
tr_runInEventThread( tor->session, stopTorrent, tor );
tr_globalUnlock( tor->session );