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
+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