diff options
author | erdgeist <> | 2007-01-27 17:04:55 +0000 |
---|---|---|
committer | erdgeist <> | 2007-01-27 17:04:55 +0000 |
commit | a244da8d5e620a922681e52698755810c44edde5 (patch) | |
tree | 11b3ffc12668f4fe010e89f0694ba950d10caa17 /trackerlogic.c | |
parent | dc1099dd66edbf2bce04dae2c118452085160f2a (diff) |
really copy in new peer, even if it already existed, to remember its state
Diffstat (limited to 'trackerlogic.c')
-rw-r--r-- | trackerlogic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 62c5972..b1d7349 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -224,6 +224,7 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer ) { | |||
224 | torrent->peer_list->seed_count[0]--; | 224 | torrent->peer_list->seed_count[0]--; |
225 | if( !(OT_FLAG(peer_dest) & PEER_FLAG_SEEDING ) && (OT_FLAG(peer) & PEER_FLAG_SEEDING ) ) | 225 | if( !(OT_FLAG(peer_dest) & PEER_FLAG_SEEDING ) && (OT_FLAG(peer) & PEER_FLAG_SEEDING ) ) |
226 | torrent->peer_list->seed_count[0]++; | 226 | torrent->peer_list->seed_count[0]++; |
227 | memmove( peer_dest, peer, sizeof( ot_peer ) ); | ||
227 | 228 | ||
228 | assert( torrent->peer_list->seed_count[0] >= 0 ); | 229 | assert( torrent->peer_list->seed_count[0] >= 0 ); |
229 | assert( torrent->peer_list->seed_count[0] <= torrent->peer_list->peers[0].size ); | 230 | assert( torrent->peer_list->seed_count[0] <= torrent->peer_list->peers[0].size ); |