Changeset 8116


Ignore:
Timestamp:
Mar 30, 2009, 5:30:28 AM (13 years ago)
Author:
charles
Message:

(trunk libT) possible fix for #1894: Crash when download finishes and seed ratio is already met

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r8097 r8116  
    996996}
    997997
     998static int
     999checkRatioIdle( void * tor )
     1000{
     1001    tr_torrentCheckSeedRatio( tor );
     1002    return 0; /* one-shot timer */
     1003}
     1004
    9981005static void
    9991006peerCallbackFunc( void * vpeer, void * vevent, void * vt )
     
    10441051            }
    10451052
    1046             tr_torrentCheckSeedRatio( tor );
     1053            /* we can't check the stop ratio here because the code calling
     1054             * this function requires that the torrent not be stopped.
     1055             * so instead, add an idle timer to check the ratio as soon
     1056             * as the calling code is done.  (ticket #1894) */
     1057            tr_timerNew( tor->session, checkRatioIdle, tor, 1 );
    10471058
    10481059            break;
Note: See TracChangeset for help on using the changeset viewer.