From 47292055cab83890d46ca96c2b34f53dfef41374 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 14 Sep 2008 00:57:11 +0000 Subject: [PATCH] (libT) #1269: check for the `downloaded' key in the announce repsonse. a successful announce response already resets the rescrape countdown, so that half of the ticket is redundant. --- libtransmission/tracker.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libtransmission/tracker.c b/libtransmission/tracker.c index c6e79fadc..cf4f44724 100644 --- a/libtransmission/tracker.c +++ b/libtransmission/tracker.c @@ -365,6 +365,9 @@ onTrackerResponse( tr_session * session, if(( tr_bencDictFindInt( &benc, "incomplete", &i ))) t->leecherCount = incomplete = i; + if(( tr_bencDictFindInt( &benc, "downloaded", &i ))) + t->timesDownloaded = i; + if(( tmp = tr_bencDictFind( &benc, "peers" ))) { const int allAreSeeds = incomplete == 0;