fix backwards compatibility with tracker_url and async_add_torrent

This commit is contained in:
Arvid Norberg 2013-09-10 23:35:37 +00:00
parent 730bc38515
commit 955c369168
1 changed files with 7 additions and 0 deletions

View File

@ -655,6 +655,13 @@ namespace libtorrent
void session::async_add_torrent(add_torrent_params const& params)
{
add_torrent_params* p = new add_torrent_params(params);
#ifndef TORRENT_NO_DEPRECATE
if (params.tracker_url)
{
p->trackers.push_back(params.tracker_url);
p->tracker_url = NULL;
}
#endif
TORRENT_ASYNC_CALL1(async_add_torrent, p);
}