1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-16 16:55:36 +00:00

(trunk libT) #3519 "webseeds don't work" -- patch from gostrc to add support for a single string in the url-list

This commit is contained in:
Charles Kerr 2010-08-22 18:40:18 +00:00
parent 1fbdc6b7c5
commit 6df6fd929b

View file

@ -360,11 +360,11 @@ geturllist( tr_info * inf,
tr_benc * meta )
{
tr_benc * urls;
const char * url;
if( tr_bencDictFindList( meta, "url-list", &urls ) )
{
int i;
const char * url;
const int n = tr_bencListSize( urls );
inf->webseedCount = 0;
@ -374,6 +374,12 @@ geturllist( tr_info * inf,
if( tr_bencGetStr( tr_bencListChild( urls, i ), &url ) )
inf->webseeds[inf->webseedCount++] = tr_strdup( url );
}
else if( tr_bencDictFindStr( meta, "url-list", &url ) ) /* handle single items in webseeds */
{
inf->webseedCount = 1;
inf->webseeds = tr_new0( char*, 1 );
inf->webseeds[0] = tr_strdup( url );
}
}
static int