mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-11 20:52:30 +00:00
Merge branch 'master' into xirvik
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
AC_INIT(rtorrent, 0.8.9, jaris@ifi.uio.no)
|
||||
|
||||
AC_DEFINE(API_VERSION, 2, api version)
|
||||
AC_DEFINE(API_VERSION, 3, api version)
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
@@ -328,6 +328,16 @@ apply_d_add_peer(core::Download* download, const std::string& arg) {
|
||||
torrent::connection_manager()->resolver()(host, (int)rak::socket_address::pf_inet, SOCK_STREAM, call_add_d_peer_t(download, port));
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
d_chunks_seen(core::Download* download) {
|
||||
const uint8_t* seen = download->download()->chunks_seen();
|
||||
|
||||
if (seen == NULL)
|
||||
return std::string();
|
||||
else
|
||||
return std::string((const char*)seen, download->download()->file_list()->size_chunks());
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
f_multicall(core::Download* download, const torrent::Object::list_type& args) {
|
||||
if (args.empty())
|
||||
@@ -813,6 +823,8 @@ initialize_command_download() {
|
||||
CMD2_DL ("d.size_pex", CMD2_ON_DL(size_pex));
|
||||
CMD2_DL ("d.max_size_pex", CMD2_ON_DL(max_size_pex));
|
||||
|
||||
CMD2_DL ("d.chunks_seen", tr1::bind(&d_chunks_seen, tr1::placeholders::_1));
|
||||
|
||||
CMD2_DL ("d.completed_bytes", CMD2_ON_FL(completed_bytes));
|
||||
CMD2_DL ("d.completed_chunks", CMD2_ON_FL(completed_chunks));
|
||||
CMD2_DL ("d.left_bytes", CMD2_ON_FL(left_bytes));
|
||||
|
||||
Reference in New Issue
Block a user