mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-13 20:56:17 +00:00
* Fixed leaking of ViewFilters.
* Messed up the patch, now properly sets min/max_peers on incomplete downloads. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@760 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -172,19 +172,17 @@ DownloadFactory::receive_success() {
|
|||||||
// Move to 'rtorrent'.
|
// Move to 'rtorrent'.
|
||||||
download->variable()->set("connection_leech", m_variables.get("connection_leech"));
|
download->variable()->set("connection_leech", m_variables.get("connection_leech"));
|
||||||
download->variable()->set("connection_seed", m_variables.get("connection_seed"));
|
download->variable()->set("connection_seed", m_variables.get("connection_seed"));
|
||||||
|
|
||||||
download->variable()->set("max_uploads", control->variable()->get("max_uploads"));
|
download->variable()->set("max_uploads", control->variable()->get("max_uploads"));
|
||||||
|
download->variable()->set("min_peers", control->variable()->get("min_peers"));
|
||||||
|
download->variable()->set("max_peers", control->variable()->get("max_peers"));
|
||||||
|
|
||||||
if (download->variable()->get_value("complete") != 0) {
|
if (download->variable()->get_value("complete") != 0) {
|
||||||
|
|
||||||
if (control->variable()->get_value("min_peers_seed") >= 0)
|
if (control->variable()->get_value("min_peers_seed") >= 0)
|
||||||
download->variable()->set("min_peers", control->variable()->get("min_peers_seed"));
|
download->variable()->set("min_peers", control->variable()->get("min_peers_seed"));
|
||||||
else
|
|
||||||
download->variable()->set("min_peers", control->variable()->get("min_peers"));
|
|
||||||
|
|
||||||
if (control->variable()->get_value("max_peers_seed") >= 0)
|
if (control->variable()->get_value("max_peers_seed") >= 0)
|
||||||
download->variable()->set("max_peers", control->variable()->get("max_peers_seed"));
|
download->variable()->set("max_peers", control->variable()->get("max_peers_seed"));
|
||||||
else
|
|
||||||
download->variable()->set("max_peers", control->variable()->get("max_peers"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!control->variable()->get_value("use_udp_trackers"))
|
if (!control->variable()->get_value("use_udp_trackers"))
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ void
|
|||||||
ViewManager::clear() {
|
ViewManager::clear() {
|
||||||
std::for_each(begin(), end(), rak::call_delete<View>());
|
std::for_each(begin(), end(), rak::call_delete<View>());
|
||||||
std::for_each(m_sort.begin(), m_sort.end(), rak::on(rak::mem_ref(&sort_map::value_type::second), rak::call_delete<ViewSort>()));
|
std::for_each(m_sort.begin(), m_sort.end(), rak::on(rak::mem_ref(&sort_map::value_type::second), rak::call_delete<ViewSort>()));
|
||||||
|
std::for_each(m_filter.begin(), m_filter.end(), rak::on(rak::mem_ref(&filter_map::value_type::second), rak::call_delete<ViewFilter>()));
|
||||||
|
|
||||||
base_type::clear();
|
base_type::clear();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user