diff --git a/rak/error_number.h b/rak/error_number.h index 400c7989..11402bd9 100644 --- a/rak/error_number.h +++ b/rak/error_number.h @@ -53,6 +53,7 @@ public: static const int e_noent = ENOENT; static const int e_nomem = ENOMEM; static const int e_notdir = ENOTDIR; + static const int e_isdir = EISDIR; static const int e_intr = EINTR; @@ -73,6 +74,7 @@ public: static error_number current() { return errno; } static void clear_global() { errno = 0; } + static void set_global(error_number err) { errno = err.m_errno; } bool operator == (const error_number& e) const { return m_errno == e.m_errno; } diff --git a/src/option_handler_rules.cc b/src/option_handler_rules.cc index f91ff5f9..dfa84521 100644 --- a/src/option_handler_rules.cc +++ b/src/option_handler_rules.cc @@ -514,6 +514,15 @@ initialize_option_handler(Control* c) { variables->insert("timeout_safe_sync", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::timeout_safe_sync), rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_timeout_safe_sync))); + variables->insert("preload_min_pipelined", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_min_pipelined), + rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_min_pipelined))); + + variables->insert("preload_min_size", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_min_size), + rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_min_size))); + + variables->insert("preload_required_rate", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_required_rate), + rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_required_rate))); + variables->insert("port_range", new utils::VariableStringSlot(rak::value_fn(std::string()), rak::bind_ptr_fn(&apply_port_range, c))); variables->insert("hash_read_ahead", new utils::VariableValueSlot(rak::ptr_fn(torrent::hash_read_ahead), rak::bind_ptr_fn(&apply_hash_read_ahead, c)));