mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-08 07:09:21 +00:00
* 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:
+14
-4
@@ -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*
|
||||
|
||||
Reference in New Issue
Block a user