From 781e1ca7dc238ada5cfa41705a588ed65f639bd6 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Tue, 7 Aug 2007 23:56:58 +0000 Subject: [PATCH] * Add alternate execute_ commands. * Fixed the queue size calculations. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@951 e378c898-3ddf-0310-93e7-cc216c733640 --- src/command_download.cc | 3 +++ src/command_local.cc | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/command_download.cc b/src/command_download.cc index 109d34f4..24ff9b56 100644 --- a/src/command_download.cc +++ b/src/command_download.cc @@ -203,6 +203,9 @@ retrieve_d_priority_str(core::Download* download) { torrent::Object apply_d_ratio(core::Download* download) { + if (download->is_hash_checking()) + return int64_t(); + int64_t bytesDone = download->download()->bytes_done(); int64_t upTotal = download->download()->up_rate()->total(); diff --git a/src/command_local.cc b/src/command_local.cc index cee3fd88..0c7531a1 100644 --- a/src/command_local.cc +++ b/src/command_local.cc @@ -83,5 +83,8 @@ initialize_command_local() { ADD_COMMAND_VALUE_TRI_OCT("umask", rak::make_mem_fun(control, &Control::set_umask), rak::make_mem_fun(control, &Control::umask)); ADD_COMMAND_STRING_TRI("working_directory", rak::make_mem_fun(control, &Control::set_working_directory), rak::make_mem_fun(control, &Control::working_directory)); - ADD_COMMAND_LIST("execute", rak::bind2_mem_fn(&rpc::execFile, &rpc::ExecFile::execute_object, rpc::ExecFile::flag_throw | rpc::ExecFile::flag_expand_tilde)); + ADD_COMMAND_LIST("execute", rak::bind2_mem_fn(&rpc::execFile, &rpc::ExecFile::execute_object, rpc::ExecFile::flag_throw | rpc::ExecFile::flag_expand_tilde)); + ADD_COMMAND_LIST("execute_nothrow", rak::bind2_mem_fn(&rpc::execFile, &rpc::ExecFile::execute_object, rpc::ExecFile::flag_expand_tilde)); + ADD_COMMAND_LIST("execute_raw", rak::bind2_mem_fn(&rpc::execFile, &rpc::ExecFile::execute_object, rpc::ExecFile::flag_throw)); + ADD_COMMAND_LIST("execute_raw_nothrow", rak::bind2_mem_fn(&rpc::execFile, &rpc::ExecFile::execute_object, 0)); }