* Include locally available chunks in the "chunks seen" statistics for completed/distributed copies. Patch by Josef Drexler.

* Added 'd.get_bitfield' command for retrieving the bitfield in hex format. Patch by Thomas Rosner. (PD)

* Fixed include headers for gcc-4.4.0. Patch by 'kloeri'.

* Switched a 'long long' with 'int64_t' in xmlrpc.cc to avoid incompatible types for some systems.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1092 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2009-05-14 13:07:47 +00:00
parent 855bf9a781
commit 63af7078a3
13 changed files with 54 additions and 16 deletions
+9
View File
@@ -38,6 +38,7 @@
#include <functional>
#include <unistd.h>
#include <cstdio>
#include <rak/file_stat.h>
#include <rak/error_number.h>
#include <rak/path.h>
@@ -289,6 +290,13 @@ retrieve_d_custom_throw(core::Download* download, const std::string& key) {
}
}
torrent::Object
retrieve_d_bitfield(core::Download* download) {
const torrent::Bitfield* bitField = download->download()->file_list()->bitfield();
return torrent::Object(rak::transform_hex(bitField->begin(), bitField->end()));
}
// Just a helper function atm.
torrent::Object
cmd_d_initialize_logs(core::Download* download) {
@@ -552,6 +560,7 @@ initialize_command_download() {
ADD_CD_VOID("hash", &retrieve_d_hash);
ADD_CD_VOID("local_id", &retrieve_d_local_id);
ADD_CD_VOID("local_id_html", &retrieve_d_local_id_html);
ADD_CD_VOID("bitfield", &retrieve_d_bitfield);
ADD_CD_VOID("base_path", &retrieve_d_base_path);
ADD_CD_VOID("base_filename", &retrieve_d_base_filename);
ADD_CD_STRING_UNI("name", rak::on(std::mem_fun(&core::Download::download), std::mem_fun(&torrent::Download::name)));