Changeset 7985


Ignore:
Timestamp:
Mar 1, 2009, 5:37:10 PM (14 years ago)
Author:
charles
Message:

(trunk libT) tweak r7978

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r7978 r7985  
    21302130    {
    21312131        const double up = tor->uploadedCur + tor->uploadedPrev;
    2132         double down = tor->downloadedCur + tor->downloadedPrev;
    2133         if (!down)
     2132        uint64_t down = tor->downloadedCur + tor->downloadedPrev;
     2133        double ratio;
     2134
     2135        /* maybe we're the initial seeder and never downloaded anything... */
     2136        if( down == 0 )
    21342137            down = tr_cpHaveValid( &tor->completion );
    2135        
    2136         const double ratio = tr_getRatio( up, down );
     2138
     2139        ratio = tr_getRatio( up, down );
     2140
    21372141        if( ratio >= seedRatio )
    21382142        {
Note: See TracChangeset for help on using the changeset viewer.