Return hex instead of binary for 'd.chunks_seen'.

This commit is contained in:
rakshasa
2012-04-04 02:09:08 +09:00
parent b28f2ea807
commit 020de10f38
2 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
AC_INIT(rtorrent, 0.9.1, jaris@ifi.uio.no)
AC_DEFINE(API_VERSION, 3, api version)
AC_DEFINE(API_VERSION, 4, api version)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
+8 -2
View File
@@ -334,8 +334,14 @@ d_chunks_seen(core::Download* download) {
if (seen == NULL)
return std::string();
else
return std::string((const char*)seen, download->download()->file_list()->size_chunks());
uint32_t size = download->download()->file_list()->size_chunks();
std::string result;
result.resize(size * 2);
rak::transform_hex((const char*)seen, (const char*)seen + size, result.begin());
return result;
}
torrent::Object