mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 05:02:31 +00:00
* Preliminary API changes for the throttle groups. Patch by Josef
Drexler with some changes. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1034 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include <torrent/exceptions.h>
|
||||
#include <torrent/connection_manager.h>
|
||||
#include <torrent/rate.h>
|
||||
#include <torrent/throttle.h>
|
||||
#include <torrent/torrent.h>
|
||||
#include <torrent/tracker.h>
|
||||
#include <torrent/tracker_list.h>
|
||||
@@ -250,15 +251,15 @@ print_client_version(char* first, char* last, const torrent::ClientInfo& clientI
|
||||
|
||||
char*
|
||||
print_status_info(char* first, char* last) {
|
||||
if (torrent::up_throttle() == 0)
|
||||
if (torrent::up_throttle_global()->max_rate() == 0)
|
||||
first = print_buffer(first, last, "[Throttle off");
|
||||
else
|
||||
first = print_buffer(first, last, "[Throttle %3i", torrent::up_throttle() / 1024);
|
||||
first = print_buffer(first, last, "[Throttle %3i", torrent::up_throttle_global()->max_rate() / 1024);
|
||||
|
||||
if (torrent::down_throttle() == 0)
|
||||
if (torrent::down_throttle_global()->max_rate() == 0)
|
||||
first = print_buffer(first, last, "/off KB]");
|
||||
else
|
||||
first = print_buffer(first, last, "/%3i KB]", torrent::down_throttle() / 1024);
|
||||
first = print_buffer(first, last, "/%3i KB]", torrent::down_throttle_global()->max_rate() / 1024);
|
||||
|
||||
first = print_buffer(first, last, " [Rate %5.1f/%5.1f KB]",
|
||||
(double)torrent::up_rate()->rate() / 1024.0,
|
||||
|
||||
Reference in New Issue
Block a user