mirror of
https://github.com/transmission/transmission
synced 2024-12-23 16:24:02 +00:00
(trunk utils) #3302 "Scraping with transmission-show grabs /scrape without any GET parameters" -- fixed in trunk for 2.10. Thanks LolCol
This commit is contained in:
parent
d4c8701ac8
commit
66650a2b62
1 changed files with 10 additions and 3 deletions
13
utils/show.c
13
utils/show.c
|
@ -179,11 +179,17 @@ doScrape( const tr_info * inf )
|
|||
CURL * curl;
|
||||
CURLcode res;
|
||||
struct evbuffer * buf;
|
||||
const char * url = inf->trackers[i].scrape;
|
||||
const char * scrape = inf->trackers[i].scrape;
|
||||
char * url;
|
||||
|
||||
if( url == NULL )
|
||||
if( scrape == NULL )
|
||||
continue;
|
||||
|
||||
url = tr_strdup_printf( "%s%cinfo_hash=%s",
|
||||
scrape,
|
||||
strchr( scrape, '?' ) ? '&' : '?',
|
||||
inf->hashEscaped );
|
||||
|
||||
printf( "%s ... ", url );
|
||||
fflush( stdout );
|
||||
|
||||
|
@ -244,8 +250,9 @@ doScrape( const tr_info * inf )
|
|||
}
|
||||
}
|
||||
|
||||
evbuffer_free( buf );
|
||||
curl_easy_cleanup( curl );
|
||||
evbuffer_free( buf );
|
||||
tr_free( url );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue