* 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:
rakshasa
2006-08-16 17:50:24 +00:00
parent 708e89ebad
commit dbfb9f1165
2 changed files with 4 additions and 5 deletions
+3 -5
View File
@@ -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"))
+1
View File
@@ -154,6 +154,7 @@ void
ViewManager::clear() {
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_filter.begin(), m_filter.end(), rak::on(rak::mem_ref(&filter_map::value_type::second), rak::call_delete<ViewFilter>()));
base_type::clear();
}