(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:
Charles Kerr 2010-06-17 02:49:39 +00:00
parent d4c8701ac8
commit 66650a2b62
1 changed files with 10 additions and 3 deletions

View File

@ -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 );
}
}