1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 00:04:06 +00:00

#1308: Transmission forgets it's verifying data

This commit is contained in:
Charles Kerr 2008-10-28 15:13:07 +00:00
parent 6bc269d2bc
commit f2a933fb77
3 changed files with 23 additions and 2 deletions

View file

@ -1124,9 +1124,14 @@ torrentStart( tr_torrent * tor,
if( !tor->isRunning )
{
if( reloadProgress )
const int isVerifying = tr_verifyInProgress( tor );
if( !isVerifying && reloadProgress )
tr_torrentLoadResume( tor, TR_FR_PROGRESS, NULL );
tor->isRunning = 1;
if( !isVerifying )
tr_verifyAdd( tor, checkAndStartCB );
}

View file

@ -201,6 +201,20 @@ compareVerifyByTorrent( const void * va,
return a->torrent - b;
}
int
tr_verifyInProgress( const tr_torrent * tor )
{
int found = FALSE;
tr_lock * lock = getVerifyLock( );
tr_lockLock( lock );
found = ( tor == currentNode.torrent )
|| ( tr_list_find( verifyList, tor, compareVerifyByTorrent ) != NULL );
tr_lockUnlock( lock );
return found;
}
void
tr_verifyRemove( tr_torrent * tor )
{

View file

@ -20,4 +20,6 @@ void tr_verifyAdd( tr_torrent * tor,
void tr_verifyRemove( tr_torrent * tor );
int tr_verifyInProgress( const tr_torrent * tor );
#endif