Ignore:
Timestamp:
Jul 9, 2007, 5:20:23 AM (14 years ago)
Author:
charles
Message:

fix values for tr_cpLeftUntilComplete(), which were slightly off. (TooMuchTime?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.c

    r2254 r2308  
    324324
    325325    if( !tr_cpBlockIsComplete( cp, tor->blockCount - 1 ) )
    326         b -= (tor->info.totalSize % tor->blockSize);
     326        b -= (tor->blockSize - (tor->info.totalSize % tor->blockSize));
    327327
    328328    return b;
     
    352352    if( !tr_cpBlockIsComplete( cp, tor->blockCount-1 )
    353353                  && info->pieces[info->pieceCount-1].priority != TR_PRI_DND )
    354         b -= (tor->info.totalSize % tor->blockSize);
     354        b -= (tor->blockSize - (tor->info.totalSize % tor->blockSize));
    355355
    356356    return b;
     
    383383
    384384    if( tr_bitfieldHas( cp->blockBitfield, tor->blockCount - 1 ) )
    385         b -= (tor->info.totalSize % tor->blockSize);
     385        b -= (tor->blockSize - (tor->info.totalSize % tor->blockSize));
    386386
    387387   return b;
Note: See TracChangeset for help on using the changeset viewer.