mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 12:12:31 +00:00
Cleaned up the API.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@456 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -46,22 +46,22 @@ WindowStatusbar::redraw() {
|
||||
int pos = 0;
|
||||
char buf[128];
|
||||
|
||||
if (torrent::get(torrent::THROTTLE_ROOT_CONST_RATE) == 0)
|
||||
if (torrent::get_write_throttle() == 0)
|
||||
pos = snprintf(buf, 128, "off/");
|
||||
else
|
||||
pos = snprintf(buf, 128, "%3i/", (int)torrent::get(torrent::THROTTLE_ROOT_CONST_RATE) / 1024);
|
||||
pos = snprintf(buf, 128, "%3i/", torrent::get_write_throttle() / 1024);
|
||||
|
||||
if (torrent::get(torrent::THROTTLE_READ_CONST_RATE) == 0)
|
||||
if (torrent::get_read_throttle() == 0)
|
||||
pos = snprintf(buf + pos, 128 - pos, "off");
|
||||
else
|
||||
pos = snprintf(buf + pos, 128 - pos, "%-3i", (int)torrent::get(torrent::THROTTLE_READ_CONST_RATE) / 1024);
|
||||
pos = snprintf(buf + pos, 128 - pos, "%-3i", torrent::get_read_throttle() / 1024);
|
||||
|
||||
m_canvas->print(0, 0, "Throttle U/D: %s Listen: %s:%i%s Handshakes: %i",
|
||||
buf,
|
||||
!torrent::get_ip().empty() ? torrent::get_ip().c_str() : "<default>",
|
||||
(int)torrent::get(torrent::LISTEN_PORT),
|
||||
(int)torrent::get_listen_port(),
|
||||
!torrent::get_bind().empty() ? (" Bind: " + torrent::get_bind()).c_str() : "",
|
||||
(int)torrent::get(torrent::HANDSHAKES_TOTAL));
|
||||
torrent::get_total_handshakes());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user