summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trackerlogic.c4
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;