diff options
Diffstat (limited to 'trackerlogic.c')
-rw-r--r-- | trackerlogic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index faca19b..05c00b0 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -103,6 +103,16 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_SYNC_PARAM( | |||
103 | } else { | 103 | } else { |
104 | stats_issue_event( EVENT_RENEW, 0, OT_PEERTIME( peer_dest ) ); | 104 | stats_issue_event( EVENT_RENEW, 0, OT_PEERTIME( peer_dest ) ); |
105 | 105 | ||
106 | #ifdef WANT_SYNC_LIVE | ||
107 | /* Won't live sync peers that come back too fast. Only exception: | ||
108 | fresh "completed" reports */ | ||
109 | if( !from_sync ) { | ||
110 | if( OT_PEERTIME( peer_dest ) > OT_CLIENT_SYNC_RENEW_BOUNDARY || | ||
111 | ( !(OT_FLAG(peer_dest) & PEER_FLAG_COMPLETED ) && (OT_FLAG(peer) & PEER_FLAG_COMPLETED ) ) ) | ||
112 | livesync_tell( hash, peer ); | ||
113 | } | ||
114 | #endif | ||
115 | |||
106 | if( (OT_FLAG(peer_dest) & PEER_FLAG_SEEDING ) && !(OT_FLAG(peer) & PEER_FLAG_SEEDING ) ) | 116 | if( (OT_FLAG(peer_dest) & PEER_FLAG_SEEDING ) && !(OT_FLAG(peer) & PEER_FLAG_SEEDING ) ) |
107 | torrent->peer_list->seed_count--; | 117 | torrent->peer_list->seed_count--; |
108 | if( !(OT_FLAG(peer_dest) & PEER_FLAG_SEEDING ) && (OT_FLAG(peer) & PEER_FLAG_SEEDING ) ) | 118 | if( !(OT_FLAG(peer_dest) & PEER_FLAG_SEEDING ) && (OT_FLAG(peer) & PEER_FLAG_SEEDING ) ) |