mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
fix values for tr_cpLeftUntilComplete(), which were slightly off. (TooMuchTime)
This commit is contained in:
parent
7e55e27e7c
commit
8fd06f3687
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue