* Remove the PeerInfo header dependency inside torrent/data.

* Cleaned up BlockTransfer.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@807 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-11-19 08:27:20 +00:00
parent f9916b574f
commit 4819162ffa
2 changed files with 15 additions and 4 deletions
+14 -4
View File
@@ -224,10 +224,20 @@ print_download_percentage_done(char* first, char* last, core::Download* d) {
char*
print_client_version(char* first, char* last, const torrent::ClientInfo& clientInfo) {
return print_buffer(first, last, "%s %hhu.%hhu.%hhu.%hhu",
clientInfo.short_description(),
clientInfo.version()[0], clientInfo.version()[1],
clientInfo.version()[2], clientInfo.version()[3]);
switch (torrent::ClientInfo::version_size(clientInfo.type())) {
case 4:
return print_buffer(first, last, "%s %hhu.%hhu.%hhu.%hhu",
clientInfo.short_description(),
clientInfo.version()[0], clientInfo.version()[1],
clientInfo.version()[2], clientInfo.version()[3]);
case 3:
return print_buffer(first, last, "%s %hhu.%hhu.%hhu",
clientInfo.short_description(),
clientInfo.version()[0], clientInfo.version()[1],
clientInfo.version()[2]);
default:
return print_buffer(first, last, "%s", clientInfo.short_description());
}
}
char*