From 0bf88427c6c33f0aabc4e8374ed77542c4f18d2a Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Wed, 2 Sep 2009 02:18:36 +0000 Subject: Add spotting woodpeckers, thanks to Vasya P. again --- trackerlogic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'trackerlogic.c') diff --git a/trackerlogic.c b/trackerlogic.c index 18895ba..6ca1ad2 100644 --- a/trackerlogic.c +++ b/trackerlogic.c @@ -145,7 +145,10 @@ size_t add_peer_to_torrent_and_return_peers( ot_hash hash, ot_peer *peer, PROTO_ } else { stats_issue_event( EVENT_RENEW, 0, OT_PEERTIME( peer_dest ) ); - +#ifdef WANT_SPOT_WOODPECKER + if( ( OT_PEERTIME(peer_dest) > 0 ) && ( OT_PEERTIME(peer_dest) < 20 ) ) + stats_issue_event( EVENT_WOODPECKER, 0, (uintptr_t)peer ); +#endif #ifdef WANT_SYNC_LIVE /* Won't live sync peers that come back too fast. Only exception: fresh "completed" reports */ -- cgit v1.2.3