|
|
@ -60,11 +60,6 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_SYNC_PARAM( |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef WANT_SYNC_LIVE |
|
|
|
|
|
|
|
if( !from_changeset ) |
|
|
|
|
|
|
|
livesync_tell( hash, peer, PEER_FLAG_LEECHING ); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( !exactmatch ) { |
|
|
|
if( !exactmatch ) { |
|
|
|
/* Create a new torrent entry, then */ |
|
|
|
/* Create a new torrent entry, then */ |
|
|
|
memmove( &torrent->hash, hash, sizeof( ot_hash ) ); |
|
|
|
memmove( &torrent->hash, hash, sizeof( ot_hash ) ); |
|
|
@ -109,6 +104,11 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_SYNC_PARAM( |
|
|
|
memmove( peer_dest, peer, sizeof( ot_peer ) ); |
|
|
|
memmove( peer_dest, peer, sizeof( ot_peer ) ); |
|
|
|
torrent->peer_list->peer_count++; |
|
|
|
torrent->peer_list->peer_count++; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WANT_SYNC_LIVE |
|
|
|
|
|
|
|
if( !from_changeset ) |
|
|
|
|
|
|
|
livesync_tell( hash, peer, PEER_FLAG_LEECHING ); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if( OT_FLAG( peer ) & PEER_FLAG_COMPLETED ) |
|
|
|
if( OT_FLAG( peer ) & PEER_FLAG_COMPLETED ) |
|
|
|
torrent->peer_list->down_count++; |
|
|
|
torrent->peer_list->down_count++; |
|
|
|
|
|
|
|
|
|
|
|