Cleaned up the API.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@456 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-06-07 22:20:03 +00:00
parent 2e7333792f
commit 693ce38317
9 changed files with 52 additions and 31 deletions
+6 -6
View File
@@ -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());
}
}