Prevent libtorrent from crashing when 'announce' is not in the tracker

url.
This commit is contained in:
Andrew Resch 2008-09-07 08:46:41 +00:00
parent 4bd88df4de
commit b210a81967

View file

@ -91,8 +91,8 @@ namespace libtorrent
std::size_t pos = url.find("announce");
if (pos == std::string::npos)
{
fail(-1, ("scrape is not available on url: '"
+ req.url +"'").c_str());
//fail(-1, ("scrape is not available on url: '"
// + req.url +"'").c_str());
return;
}
url.replace(pos, 8, "scrape");