From 87aefaf5ff4ee8fbce1342e79b3139e6eb1c300e Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 14 Dec 2009 17:17:05 +0000 Subject: [PATCH] (trunk libT) #1699 "announce to multiple trackers at once" -- fix minor bug in reporting scrape results when an announce returns enough information that a separate scrape isn't necessary. --- libtransmission/announcer.c | 1 + libtransmission/web.c | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c index d1d435e37..b0301f07d 100644 --- a/libtransmission/announcer.c +++ b/libtransmission/announcer.c @@ -1273,6 +1273,7 @@ onAnnounceDone( tr_session * session, if( gotScrape ) { tier->lastScrapeTime = now; + tier->lastScrapeSucceeded = 1; tier->scrapeAt = now + tier->scrapeIntervalSec; } diff --git a/libtransmission/web.c b/libtransmission/web.c index b150d7993..ff33fd7ec 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -140,7 +140,6 @@ addTask( void * vtask ) if( session && session->web ) { - CURLMcode mcode; CURL * e = curl_easy_init( ); struct tr_web * web = session->web; const long timeout = getTimeoutFromURL( task->url ); @@ -186,11 +185,9 @@ addTask( void * vtask ) curl_easy_setopt( e, CURLOPT_INTERFACE, tr_ntop_non_ts( &web->addr ) ); if( task->range ) curl_easy_setopt( e, CURLOPT_RANGE, task->range ); - else /* don't set encoding on webseeds; it messes up binary data */ - curl_easy_setopt( e, CURLOPT_ENCODING, "" ); - mcode = curl_multi_add_handle( web->multi, e ); - ++web->taskCount; + if( curl_multi_add_handle( web->multi, e ) == CURLM_OK ) + ++web->taskCount; } }