mirror of
git://erdgeist.org/opentracker
synced 2025-02-09 21:46:23 +00:00
Fixed a bug where we forgot to stamp torrents that are not new.
This commit is contained in:
parent
89056078cb
commit
f697fa3dda
@ -65,10 +65,12 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_TRACKER_SYNC
|
|||||||
}
|
}
|
||||||
|
|
||||||
byte_zero( torrent->peer_list, sizeof( ot_peerlist ) );
|
byte_zero( torrent->peer_list, sizeof( ot_peerlist ) );
|
||||||
torrent->peer_list->base = NOW;
|
|
||||||
} else
|
} else
|
||||||
clean_single_torrent( torrent );
|
clean_single_torrent( torrent );
|
||||||
|
|
||||||
|
/* Timestamp our first pool */
|
||||||
|
torrent->peer_list->base = NOW;
|
||||||
|
|
||||||
/* Sanitize flags: Whoever claims to have completed download, must be a seeder */
|
/* Sanitize flags: Whoever claims to have completed download, must be a seeder */
|
||||||
if( ( OT_FLAG( peer ) & ( PEER_FLAG_COMPLETED | PEER_FLAG_SEEDING ) ) == PEER_FLAG_COMPLETED )
|
if( ( OT_FLAG( peer ) & ( PEER_FLAG_COMPLETED | PEER_FLAG_SEEDING ) ) == PEER_FLAG_COMPLETED )
|
||||||
OT_FLAG( peer ) ^= PEER_FLAG_COMPLETED;
|
OT_FLAG( peer ) ^= PEER_FLAG_COMPLETED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user