mirror of
https://github.com/transmission/transmission
synced 2025-02-03 21:12:05 +00:00
(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.
This commit is contained in:
parent
8e0e62187d
commit
87aefaf5ff
2 changed files with 3 additions and 5 deletions
|
@ -1273,6 +1273,7 @@ onAnnounceDone( tr_session * session,
|
||||||
if( gotScrape )
|
if( gotScrape )
|
||||||
{
|
{
|
||||||
tier->lastScrapeTime = now;
|
tier->lastScrapeTime = now;
|
||||||
|
tier->lastScrapeSucceeded = 1;
|
||||||
tier->scrapeAt = now + tier->scrapeIntervalSec;
|
tier->scrapeAt = now + tier->scrapeIntervalSec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,6 @@ addTask( void * vtask )
|
||||||
|
|
||||||
if( session && session->web )
|
if( session && session->web )
|
||||||
{
|
{
|
||||||
CURLMcode mcode;
|
|
||||||
CURL * e = curl_easy_init( );
|
CURL * e = curl_easy_init( );
|
||||||
struct tr_web * web = session->web;
|
struct tr_web * web = session->web;
|
||||||
const long timeout = getTimeoutFromURL( task->url );
|
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 ) );
|
curl_easy_setopt( e, CURLOPT_INTERFACE, tr_ntop_non_ts( &web->addr ) );
|
||||||
if( task->range )
|
if( task->range )
|
||||||
curl_easy_setopt( e, CURLOPT_RANGE, 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 );
|
if( curl_multi_add_handle( web->multi, e ) == CURLM_OK )
|
||||||
++web->taskCount;
|
++web->taskCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue