From 460aac5df0bb4c1e2be9c20314e94e85a8273722 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Sat, 9 Dec 2006 16:51:34 +0000 Subject: [PATCH] * Check for duplicate filenames when opening a torrent. * Removed unnessesary functions from torrent.h. * Cleanup of Handshake. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@820 e378c898-3ddf-0310-93e7-cc216c733640 --- src/display/utils.cc | 4 ++-- src/option_handler_rules.cc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/display/utils.cc b/src/display/utils.cc index 11b01253..cfd83858 100644 --- a/src/display/utils.cc +++ b/src/display/utils.cc @@ -285,8 +285,8 @@ print_status_extra(char* first, char* last, __UNUSED Control* c) { first = print_buffer(first, last, " [S %i/%i/%i]", torrent::total_handshakes(), - torrent::open_sockets(), - torrent::max_open_sockets()); + torrent::connection_manager()->size(), + torrent::connection_manager()->max_size()); first = print_buffer(first, last, " [F %i/%i]", torrent::open_files(), diff --git a/src/option_handler_rules.cc b/src/option_handler_rules.cc index 0efbe370..ea80c3d6 100644 --- a/src/option_handler_rules.cc +++ b/src/option_handler_rules.cc @@ -469,7 +469,8 @@ initialize_option_handler(Control* c) { variables->insert("hash_max_tries", new utils::VariableValueSlot(rak::ptr_fn(&torrent::hash_max_tries), rak::ptr_fn(&torrent::set_hash_max_tries))); variables->insert("max_open_files", new utils::VariableValueSlot(rak::ptr_fn(&torrent::max_open_files), rak::ptr_fn(&torrent::set_max_open_files))); - variables->insert("max_open_sockets", new utils::VariableValueSlot(rak::ptr_fn(&torrent::max_open_sockets), rak::ptr_fn(&torrent::set_max_open_sockets))); + variables->insert("max_open_sockets", new utils::VariableValueSlot(rak::mem_fn(torrent::connection_manager(), &torrent::ConnectionManager::max_size), + rak::mem_fn(torrent::connection_manager(), &torrent::ConnectionManager::set_max_size))); variables->insert("print", new utils::VariableStringSlot(rak::value_fn(std::string()), rak::mem_fn(control->core(), &core::Manager::push_log))); variables->insert("import", new utils::VariableStringSlot(rak::value_fn(std::string()), rak::ptr_fn(&apply_import)));