Changeset 6975


Ignore:
Timestamp:
Oct 28, 2008, 3:13:07 PM (12 years ago)
Author:
charles
Message:

#1308: Transmission forgets it's verifying data

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r6969 r6975  
    11251125    if( !tor->isRunning )
    11261126    {
    1127         if( reloadProgress )
     1127        const int isVerifying = tr_verifyInProgress( tor );
     1128
     1129        if( !isVerifying && reloadProgress )
    11281130            tr_torrentLoadResume( tor, TR_FR_PROGRESS, NULL );
     1131
    11291132        tor->isRunning = 1;
    1130         tr_verifyAdd( tor, checkAndStartCB );
     1133
     1134        if( !isVerifying )
     1135            tr_verifyAdd( tor, checkAndStartCB );
    11311136    }
    11321137
  • trunk/libtransmission/verify.c

    r6905 r6975  
    202202}
    203203
     204int
     205tr_verifyInProgress( const tr_torrent * tor )
     206{
     207    int found = FALSE;
     208    tr_lock * lock = getVerifyLock( );
     209    tr_lockLock( lock );
     210
     211    found = ( tor == currentNode.torrent )
     212         || ( tr_list_find( verifyList, tor, compareVerifyByTorrent ) != NULL );
     213
     214    tr_lockUnlock( lock );
     215    return found;
     216}
     217
    204218void
    205219tr_verifyRemove( tr_torrent * tor )
  • trunk/libtransmission/verify.h

    r6795 r6975  
    2121void tr_verifyRemove( tr_torrent * tor );
    2222
     23int tr_verifyInProgress( const tr_torrent * tor );
     24
    2325#endif
Note: See TracChangeset for help on using the changeset viewer.