diff --git a/src/display/utils.cc b/src/display/utils.cc index aacf3266..66d7bae9 100644 --- a/src/display/utils.cc +++ b/src/display/utils.cc @@ -287,6 +287,10 @@ print_status_extra(char* first, char* last) { torrent::currently_unchoked(), torrent::max_unchoked()); + first = print_buffer(first, last, " [D %i/%i]", + torrent::download_unchoked(), + torrent::max_download_unchoked()); + first = print_buffer(first, last, " [H %u/%u]", control->core()->get_poll_manager()->get_http_stack()->active(), control->core()->get_poll_manager()->get_http_stack()->max_active()); diff --git a/src/display/window_peer_list.cc b/src/display/window_peer_list.cc index 912c4a20..a7ed015c 100644 --- a/src/display/window_peer_list.cc +++ b/src/display/window_peer_list.cc @@ -110,7 +110,7 @@ WindowPeerList::redraw() { m_canvas->print(x, y, "%c/%c%c/%c%c", p.is_encrypted() ? (p.is_incoming() ? 'R' : 'L') : (p.is_incoming() ? 'r' : 'l'), - p.is_remote_choked() ? 'c' : 'u', + p.is_remote_queued() ? (p.is_remote_choked() ? 'C' : 'u') : (p.is_remote_choked() ? 'c' : 'U'), p.is_remote_interested() ? 'i' : 'n', p.is_local_choked() ? 'c' : 'u', p.is_local_interested() ? 'i' : 'n'); diff --git a/src/display/window_statusbar.cc b/src/display/window_statusbar.cc index a7b058e7..16917939 100644 --- a/src/display/window_statusbar.cc +++ b/src/display/window_statusbar.cc @@ -57,38 +57,6 @@ WindowStatusbar::redraw() { char* position; char* last = buffer + m_canvas->width(); -// if (torrent::up_throttle() == 0) -// position = std::max(snprintf(buffer, 128, "off/"), 0); -// else -// position = std::max(snprintf(buffer, 128, "%3i/", torrent::up_throttle() / 1024), 0); - -// if (torrent::down_throttle() == 0) -// pos = snprintf(buf + pos, 128 - pos, "off"); -// else -// pos = snprintf(buf + pos, 128 - pos, "%-3i", torrent::down_throttle() / 1024); - -// m_canvas->print(0, 0, "Throttle U/D: %s Rate: %5.1f / %5.1f KB Listen: %s:%i%s", -// buf, -// (double)torrent::up_rate()->rate() / 1024.0, -// (double)torrent::down_rate()->rate() / 1024.0, -// !torrent::local_address().empty() ? torrent::local_address().c_str() : "", -// (int)torrent::listen_port(), -// !torrent::bind_address().empty() ? (" Bind: " + torrent::bind_address()).c_str() : ""); - -// #ifndef USE_EXTRA_DEBUG -// pos = snprintf(buf, 128, "[U %i/%i][S %i/%i/%i][F %i/%i]", -// #else -// pos = snprintf(buf, 128, "%i [U %i/%i][S %i/%i/%i][F %i/%i]", -// (int)(m_control->tick() - m_lastTick), -// #endif -// torrent::currently_unchoked(), -// torrent::max_unchoked(), -// torrent::total_handshakes(), -// torrent::open_sockets(), -// torrent::max_open_sockets(), -// torrent::open_files(), -// torrent::max_open_files()); - position = print_status_info(buffer, last); m_canvas->print(0, 0, "%s", buffer); diff --git a/src/option_handler_rules.cc b/src/option_handler_rules.cc index 36ba7a89..7e118469 100644 --- a/src/option_handler_rules.cc +++ b/src/option_handler_rules.cc @@ -489,6 +489,8 @@ initialize_variables() { variables->insert("max_uploads_div", new utils::VariableValue(1)); variables->insert("max_chunks_queued", new utils::VariableValue(0)); + variables->insert("max_downloads_hack", new utils::VariableValueSlot(rak::ptr_fn(&torrent::max_download_unchoked), rak::ptr_fn(&torrent::set_max_download_unchoked))); + variables->insert("download_rate", new utils::VariableValueSlot(rak::ptr_fn(&torrent::down_throttle), rak::mem_fn(control->ui(), &ui::Root::set_down_throttle_i64), 0, (1 << 10))); variables->insert("upload_rate", new utils::VariableValueSlot(rak::ptr_fn(&torrent::up_throttle), rak::mem_fn(control->ui(), &ui::Root::set_up_throttle_i64),