Ignore:
Timestamp:
Sep 21, 2007, 2:20:55 PM (15 years ago)
Author:
charles
Message:

fix recursive crash when stopping a torrent, reported by plantain. silence a few more console messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r3119 r3121  
    275275    recheckCpState( tor );
    276276
     277    if( tor->doStopAfterHashCheck ) {
     278        tor->doStopAfterHashCheck = 0;
     279        tr_torrentStop( tor );
     280    }
     281
    277282    if( tor->runStatus == TR_RUN_RUNNING )
    278283        tr_torrentStartImpl( tor );
     
    733738    tr_torrentLock( tor );
    734739
    735     tor->statCur = ( tor->statCur + 1 ) % 2;
     740    tor->statCur = !tor->statCur;
    736741    s = &tor->stats[tor->statCur];
    737742
     
    10601065        case TR_RUN_CHECKING_WAIT:
    10611066        case TR_RUN_CHECKING:
     1067            tor->doStopAfterHashCheck = 1;
    10621068            tr_ioRecheckRemove( tor );
    1063             tr_torrentStop( tor );
    10641069            break;
    10651070
     
    10681073            tr_peerMgrStopTorrent( tor->handle->peerMgr, tor->info.hash );
    10691074            tor->runStatus = TR_RUN_STOPPING;
    1070             tor->stopDate = tr_date( );
    10711075            tr_trackerStop( tor->tracker );
    10721076            tr_ioClose( tor );
     
    10901094    tor->runStatusToSave = tor->runStatus;
    10911095    tor->runStatusToSaveIsSet = TRUE;
    1092     tor->dieFlag = TRUE;
    10931096    tr_torrentStop( tor );
    10941097    tr_timerNew( tor->handle, freeWhenStopped, tor, 250 );
Note: See TracChangeset for help on using the changeset viewer.