support udp trackers in tracker-less command line to client_test

This commit is contained in:
Arvid Norberg 2011-11-13 23:49:56 +00:00
parent 51c32fefbc
commit 981e6472b2
1 changed files with 2 additions and 1 deletions

View File

@ -1167,7 +1167,8 @@ int main(int argc, char* argv[])
// match it against the <hash>@<tracker> format
if (strlen(argv[i]) > 45
&& is_hex(argv[i], 40)
&& string_begins_no_case(argv[i] + 40, "@http"))
&& (string_begins_no_case(argv[i] + 40, "@http://")
|| string_begins_no_case(argv[i] + 40, "@udp://")))
{
sha1_hash info_hash;
from_hex(argv[i], 40, (char*)&info_hash[0]);