mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 06:32:31 +00:00
* Proper fault handling for bad SCGI requests.
* Cleaned up duplicate code in 'xmlrpc.cc'. * Cleaned up 'parse_commands.h'. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@966 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+4
-4
@@ -465,7 +465,7 @@ path_expand(std::vector<std::string>* paths, const std::string& pattern) {
|
||||
|
||||
bool
|
||||
manager_equal_tied(const std::string& path, Download* download) {
|
||||
return path == rpc::call_command_d_string("d.get_tied_to_file", download);
|
||||
return path == rpc::call_command_string("d.get_tied_to_file", rpc::make_target(download));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -514,7 +514,7 @@ Manager::receive_hashing_changed() {
|
||||
continue;
|
||||
|
||||
bool tryQuick =
|
||||
rpc::call_command_d_value("d.get_hashing", *itr) == Download::variable_hashing_initial &&
|
||||
rpc::call_command_value("d.get_hashing", rpc::make_target(*itr)) == Download::variable_hashing_initial &&
|
||||
(*itr)->download()->file_list()->bitfield()->empty();
|
||||
|
||||
if (!tryQuick && foundHashing)
|
||||
@@ -537,7 +537,7 @@ Manager::receive_hashing_changed() {
|
||||
(*itr)->download()->hash_stop();
|
||||
|
||||
if (foundHashing) {
|
||||
rpc::call_command_d_set_value("d.set_hashing", *itr, Download::variable_hashing_rehash);
|
||||
rpc::call_command_set_value("d.set_hashing", Download::variable_hashing_rehash, rpc::make_target(*itr));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -548,7 +548,7 @@ Manager::receive_hashing_changed() {
|
||||
} catch (torrent::local_error& e) {
|
||||
if (tryQuick) {
|
||||
// Make sure we don't repeat the quick hashing.
|
||||
rpc::call_command_d_set_value("d.set_hashing", *itr, Download::variable_hashing_rehash);
|
||||
rpc::call_command_set_value("d.set_hashing", Download::variable_hashing_rehash, rpc::make_target(*itr));
|
||||
|
||||
} else {
|
||||
(*itr)->set_hash_failed(true);
|
||||
|
||||
Reference in New Issue
Block a user