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

This commit is contained in:
Charles Kerr 2007-07-09 05:20:23 +00:00
parent 7e55e27e7c
commit 8fd06f3687
1 changed files with 3 additions and 3 deletions

View File

@ -323,7 +323,7 @@ tr_cpLeftUntilComplete ( const tr_completion_t * cp )
b *= tor->blockSize;
if( !tr_cpBlockIsComplete( cp, tor->blockCount - 1 ) )
b -= (tor->info.totalSize % tor->blockSize);
b -= (tor->blockSize - (tor->info.totalSize % tor->blockSize));
return b;
}
@ -351,7 +351,7 @@ tr_cpLeftUntilDone ( const tr_completion_t * cp )
i = tor->blockCount - 1;
if( !tr_cpBlockIsComplete( cp, tor->blockCount-1 )
&& info->pieces[info->pieceCount-1].priority != TR_PRI_DND )
b -= (tor->info.totalSize % tor->blockSize);
b -= (tor->blockSize - (tor->info.totalSize % tor->blockSize));
return b;
}
@ -382,7 +382,7 @@ tr_cpDownloadedValid( const tr_completion_t * cp )
uint64_t b = tr_bitfieldCountTrueBits( cp->blockBitfield ) * tor->blockSize;
if( tr_bitfieldHas( cp->blockBitfield, tor->blockCount - 1 ) )
b -= (tor->info.totalSize % tor->blockSize);
b -= (tor->blockSize - (tor->info.totalSize % tor->blockSize));
return b;
}