#1308: Transmission forgets it's verifying data
This commit is contained in:
parent
6bc269d2bc
commit
f2a933fb77
|
@ -1124,10 +1124,15 @@ 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;
|
||||
tr_verifyAdd( tor, checkAndStartCB );
|
||||
|
||||
if( !isVerifying )
|
||||
tr_verifyAdd( tor, checkAndStartCB );
|
||||
}
|
||||
|
||||
tr_globalUnlock( tor->session );
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -20,4 +20,6 @@ void tr_verifyAdd( tr_torrent * tor,
|
|||
|
||||
void tr_verifyRemove( tr_torrent * tor );
|
||||
|
||||
int tr_verifyInProgress( const tr_torrent * tor );
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue