diff --git a/src/core/download_factory.cc b/src/core/download_factory.cc index 2808eaa9..6b284ece 100644 --- a/src/core/download_factory.cc +++ b/src/core/download_factory.cc @@ -172,19 +172,17 @@ DownloadFactory::receive_success() { // Move to 'rtorrent'. download->variable()->set("connection_leech", m_variables.get("connection_leech")); download->variable()->set("connection_seed", m_variables.get("connection_seed")); + 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 (control->variable()->get_value("min_peers_seed") >= 0) 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) 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")) diff --git a/src/core/view_manager.cc b/src/core/view_manager.cc index eede4b7a..506ba612 100644 --- a/src/core/view_manager.cc +++ b/src/core/view_manager.cc @@ -154,6 +154,7 @@ void ViewManager::clear() { std::for_each(begin(), end(), rak::call_delete()); std::for_each(m_sort.begin(), m_sort.end(), rak::on(rak::mem_ref(&sort_map::value_type::second), rak::call_delete())); + std::for_each(m_filter.begin(), m_filter.end(), rak::on(rak::mem_ref(&filter_map::value_type::second), rak::call_delete())); base_type::clear(); }