From a244da8d5e620a922681e52698755810c44edde5 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 27 Jan 2007 17:04:55 +0000 Subject: really copy in new peer, even if it already existed, to remember its state --- trackerlogic.c | 1 + 1 file changed, 1 insertion(+) 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 ) { torrent->peer_list->seed_count[0]--; if( !(OT_FLAG(peer_dest) & PEER_FLAG_SEEDING ) && (OT_FLAG(peer) & PEER_FLAG_SEEDING ) ) torrent->peer_list->seed_count[0]++; + memmove( peer_dest, peer, sizeof( ot_peer ) ); assert( torrent->peer_list->seed_count[0] >= 0 ); assert( torrent->peer_list->seed_count[0] <= torrent->peer_list->peers[0].size ); -- cgit v1.2.3