Viren Negi
8 years ago
Taken reference from the http://libtorrent.org/examples.html. I modified to
code to look like this
add_torrent_params p;
....
....
sha1_hash t1;
if(from_hex(argv[1], 40, (char *)&t1[0])) {
p.info_hash = t1;
std::cout << "Got here" << std::endl;
}
else {
std::cout << "invalid info-hash" << std::endl;
exit(1);
}
I still don't see it working.
code to look like this
add_torrent_params p;
....
....
sha1_hash t1;
if(from_hex(argv[1], 40, (char *)&t1[0])) {
p.info_hash = t1;
std::cout << "Got here" << std::endl;
}
else {
std::cout << "invalid info-hash" << std::endl;
exit(1);
}
I still don't see it working.