fix r4425 oops
This commit is contained in:
parent
0e56fa0baf
commit
2b7a82b9a8
|
@ -432,7 +432,7 @@ parseProgress( tr_torrent * tor,
|
||||||
const uint8_t * walk = buf;
|
const uint8_t * walk = buf;
|
||||||
const tr_time_t * oldMTimes = (const tr_time_t *) walk;
|
const tr_time_t * oldMTimes = (const tr_time_t *) walk;
|
||||||
for( i=0; i<n; ++i ) {
|
for( i=0; i<n; ++i ) {
|
||||||
if ( curMTimes[i] && ( curMTimes[i] == oldMTimes[i] ) ) {
|
if ( curMTimes[i] == oldMTimes[i] ) {
|
||||||
const tr_file * file = &tor->info.files[i];
|
const tr_file * file = &tor->info.files[i];
|
||||||
tr_dbg( "File '%s' mtimes match -- no recheck needed", file->name );
|
tr_dbg( "File '%s' mtimes match -- no recheck needed", file->name );
|
||||||
tr_torrentSetFileChecked( tor, i, TRUE );
|
tr_torrentSetFileChecked( tor, i, TRUE );
|
||||||
|
|
|
@ -395,7 +395,9 @@ void
|
||||||
tr_ioRecheckAdd( tr_torrent * tor,
|
tr_ioRecheckAdd( tr_torrent * tor,
|
||||||
tr_recheck_done_cb recheck_done_cb )
|
tr_recheck_done_cb recheck_done_cb )
|
||||||
{
|
{
|
||||||
if( tr_torrentCountUncheckedPieces( tor ) == 0 )
|
const int uncheckedCount = tr_torrentCountUncheckedPieces( tor );
|
||||||
|
|
||||||
|
if( !uncheckedCount )
|
||||||
{
|
{
|
||||||
/* doesn't need to be checked... */
|
/* doesn't need to be checked... */
|
||||||
recheck_done_cb( tor );
|
recheck_done_cb( tor );
|
||||||
|
@ -404,6 +406,8 @@ tr_ioRecheckAdd( tr_torrent * tor,
|
||||||
{
|
{
|
||||||
struct recheck_node * node;
|
struct recheck_node * node;
|
||||||
|
|
||||||
|
tr_inf( "Queueing %s to verify %d local file pieces", tor->info.name, uncheckedCount );
|
||||||
|
|
||||||
node = tr_new( struct recheck_node, 1 );
|
node = tr_new( struct recheck_node, 1 );
|
||||||
node->torrent = tor;
|
node->torrent = tor;
|
||||||
node->recheck_done_cb = recheck_done_cb;
|
node->recheck_done_cb = recheck_done_cb;
|
||||||
|
|
|
@ -1299,5 +1299,5 @@ tr_torrentUncheck( tr_torrent * tor )
|
||||||
int
|
int
|
||||||
tr_torrentCountUncheckedPieces( const tr_torrent * tor )
|
tr_torrentCountUncheckedPieces( const tr_torrent * tor )
|
||||||
{
|
{
|
||||||
return tr_bitfieldCountTrueBits( tor->checkedPieces );
|
return tor->info.pieceCount - tr_bitfieldCountTrueBits( tor->checkedPieces );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue