(trunk libT) #4908 "Handle UDP scrapes when they don't follow the /announce idiom" -- fixed.

This commit is contained in:
Jordan Lee 2012-05-20 14:47:18 +00:00
parent e9e76fa970
commit 1e07439cd0
1 changed files with 5 additions and 0 deletions

View File

@ -268,6 +268,11 @@ tr_convertAnnounceToScrape( const char * announce )
*walk++ = '\0';
assert( walk - scrape == (int)alloc_len );
}
/* Some torrents with UDP annouce URLs don't have /announce. */
else if ( !strncmp( announce, "udp:", 4 ) )
{
scrape = tr_strdup( announce );
}
return scrape;
}