merged fixes from RC_0_16
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
* fix uTP edge case where udp socket buffer fills up
|
* fix uTP edge case where udp socket buffer fills up
|
||||||
* fix nagle implementation in uTP
|
* fix nagle implementation in uTP
|
||||||
|
|
||||||
|
* python binding fix issue where torrent_info objects where destructing when their torrents were deleted
|
||||||
* added missing field to scrape_failed_alert in python bindings
|
* added missing field to scrape_failed_alert in python bindings
|
||||||
* GCC 4.8 fix
|
* GCC 4.8 fix
|
||||||
* fix proxy failure semantics with regards to anonymous mode
|
* fix proxy failure semantics with regards to anonymous mode
|
||||||
|
@@ -175,7 +175,7 @@ void file_prioritity1(torrent_handle& h, int index, int prio)
|
|||||||
|
|
||||||
void dict_to_announce_entry(dict d, announce_entry& ae)
|
void dict_to_announce_entry(dict d, announce_entry& ae)
|
||||||
{
|
{
|
||||||
ae.url = extract<std::string>(d["url"]);
|
ae.url = extract<std::string>(d["url"]);
|
||||||
if (d.has_key("tier"))
|
if (d.has_key("tier"))
|
||||||
ae.tier = extract<int>(d["tier"]);
|
ae.tier = extract<int>(d["tier"]);
|
||||||
if (d.has_key("fail_limit"))
|
if (d.has_key("fail_limit"))
|
||||||
@@ -210,8 +210,8 @@ void replace_trackers(torrent_handle& h, object trackers)
|
|||||||
dict d;
|
dict d;
|
||||||
d = extract<dict>(object(entry));
|
d = extract<dict>(object(entry));
|
||||||
announce_entry ae;
|
announce_entry ae;
|
||||||
dict_to_announce_entry(d, ae);
|
dict_to_announce_entry(d, ae);
|
||||||
result.push_back(ae);
|
result.push_back(ae);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,9 +221,9 @@ void replace_trackers(torrent_handle& h, object trackers)
|
|||||||
|
|
||||||
void add_tracker(torrent_handle& h, dict d)
|
void add_tracker(torrent_handle& h, dict d)
|
||||||
{
|
{
|
||||||
announce_entry ae;
|
announce_entry ae;
|
||||||
dict_to_announce_entry(d, ae);
|
dict_to_announce_entry(d, ae);
|
||||||
h.add_tracker(ae);
|
h.add_tracker(ae);
|
||||||
}
|
}
|
||||||
|
|
||||||
list trackers(torrent_handle& h)
|
list trackers(torrent_handle& h)
|
||||||
@@ -289,7 +289,7 @@ list get_download_queue(torrent_handle& handle)
|
|||||||
|
|
||||||
void set_metadata(torrent_handle& handle, std::string const& buf)
|
void set_metadata(torrent_handle& handle, std::string const& buf)
|
||||||
{
|
{
|
||||||
handle.set_metadata(buf.c_str(), buf.size());
|
handle.set_metadata(buf.c_str(), buf.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@@ -300,6 +300,11 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boost::intrusive_ptr<const torrent_info> get_torrent_info(torrent_handle const& h)
|
||||||
|
{
|
||||||
|
return boost::intrusive_ptr<const torrent_info>(&h.get_torrent_info());
|
||||||
|
}
|
||||||
|
|
||||||
void force_reannounce(torrent_handle& th, int s)
|
void force_reannounce(torrent_handle& th, int s)
|
||||||
{
|
{
|
||||||
th.force_reannounce(boost::posix_time::seconds(s));
|
th.force_reannounce(boost::posix_time::seconds(s));
|
||||||
@@ -371,7 +376,7 @@ void bind_torrent_handle()
|
|||||||
.def("add_http_seed", _(&torrent_handle::add_http_seed))
|
.def("add_http_seed", _(&torrent_handle::add_http_seed))
|
||||||
.def("remove_http_seed", _(&torrent_handle::remove_http_seed))
|
.def("remove_http_seed", _(&torrent_handle::remove_http_seed))
|
||||||
.def("http_seeds", http_seeds)
|
.def("http_seeds", http_seeds)
|
||||||
.def("get_torrent_info", _(&torrent_handle::get_torrent_info), return_internal_reference<>())
|
.def("get_torrent_info", get_torrent_info)
|
||||||
.def("set_metadata", set_metadata)
|
.def("set_metadata", set_metadata)
|
||||||
.def("is_valid", _(&torrent_handle::is_valid))
|
.def("is_valid", _(&torrent_handle::is_valid))
|
||||||
.def("pause", _(&torrent_handle::pause), arg("flags") = 0)
|
.def("pause", _(&torrent_handle::pause), arg("flags") = 0)
|
||||||
|
@@ -123,7 +123,7 @@ namespace libtorrent
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
sha1_hash const& info_hash() const
|
sha1_hash const& info_hash() const
|
||||||
{ return m_torrent_file->info_hash(); }
|
{ return m_torrent_file ? m_torrent_file->info_hash() : sha1_hash(); }
|
||||||
|
|
||||||
// starts the announce timer
|
// starts the announce timer
|
||||||
void start();
|
void start();
|
||||||
|
Reference in New Issue
Block a user