diff options
author | erdgeist <> | 2007-11-28 22:52:35 +0000 |
---|---|---|
committer | erdgeist <> | 2007-11-28 22:52:35 +0000 |
commit | f697fa3dda6b2f308a8ab553b511a553d7b800a5 (patch) | |
tree | 88d0a283bf4a453a6a56bcc4774ef8697a28e27c | |
parent | 89056078cbe960deb6e1ba25e0eab59d2021c2c7 (diff) |
Fixed a bug where we forgot to stamp torrents that are not new.
-rw-r--r-- | trackerlogic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 2b4e91d..756ed0f 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -65,10 +65,12 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_TRACKER_SYNC | |||
65 | } | 65 | } |
66 | 66 | ||
67 | byte_zero( torrent->peer_list, sizeof( ot_peerlist ) ); | 67 | byte_zero( torrent->peer_list, sizeof( ot_peerlist ) ); |
68 | torrent->peer_list->base = NOW; | ||
69 | } else | 68 | } else |
70 | clean_single_torrent( torrent ); | 69 | clean_single_torrent( torrent ); |
71 | 70 | ||
71 | /* Timestamp our first pool */ | ||
72 | torrent->peer_list->base = NOW; | ||
73 | |||
72 | /* Sanitize flags: Whoever claims to have completed download, must be a seeder */ | 74 | /* Sanitize flags: Whoever claims to have completed download, must be a seeder */ |
73 | if( ( OT_FLAG( peer ) & ( PEER_FLAG_COMPLETED | PEER_FLAG_SEEDING ) ) == PEER_FLAG_COMPLETED ) | 75 | if( ( OT_FLAG( peer ) & ( PEER_FLAG_COMPLETED | PEER_FLAG_SEEDING ) ) == PEER_FLAG_COMPLETED ) |
74 | OT_FLAG( peer ) ^= PEER_FLAG_COMPLETED; | 76 | OT_FLAG( peer ) ^= PEER_FLAG_COMPLETED; |