Merge branch 'tracker_refactoring'

This commit is contained in:
Jari Sundell
2011-10-09 14:20:52 +09:00
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -797,7 +797,7 @@ initialize_command_download() {
CMD2_DL ("d.wanted_chunks", CMD2_ON_DATA(wanted_chunks));
CMD2_DL_V ("d.tracker_announce", std::bind(&torrent::TrackerList::manual_request, CMD2_BIND_TL, false));
CMD2_DL_V ("d.tracker_announce", std::bind(&torrent::Download::manual_request, CMD2_BIND_DL, false));
CMD2_DL ("d.tracker_numwant", std::bind(&torrent::TrackerList::numwant, CMD2_BIND_TL));
CMD2_DL_VALUE_V ("d.tracker_numwant.set", std::bind(&torrent::TrackerList::set_numwant, CMD2_BIND_TL, std::placeholders::_2));
CMD2_DL ("d.tracker_focus", std::bind(&torrent::TrackerList::focus_index, CMD2_BIND_TL));
+2 -2
View File
@@ -286,7 +286,7 @@ DownloadList::close_quick(Download* download) {
// handled by some parameter to the close function, or some other
// way of giving the client more control of when STOPPED requests
// are sent.
download->download()->tracker_list()->manual_cancel();
download->download()->manual_cancel();
}
void
@@ -635,7 +635,7 @@ DownloadList::confirm_finished(Download* download) {
// Send the completed request before resuming so we don't reset the
// up/downloaded baseline.
download->download()->tracker_list()->send_completed();
download->download()->send_completed();
// Save the hash in case the finished event erases it.
torrent::HashString infohash = download->info()->hash();
+1 -1
View File
@@ -91,7 +91,7 @@ WindowDownloadStatusbar::redraw() {
position = print_download_status(buffer, last, m_download);
m_canvas->print(0, 2, "[%c:%i] %s",
m_download->tracker_list()->has_active() ? 'C' : ' ',
(int)(m_download->download()->tracker_list()->time_next_connection()),
(int)(m_download->download()->time_next_connection()),
buffer);
}
+2 -2
View File
@@ -391,8 +391,8 @@ Download::bind_keys() {
m_bindings['+'] = sigc::mem_fun(this, &Download::receive_next_priority);
m_bindings['-'] = sigc::mem_fun(this, &Download::receive_prev_priority);
m_bindings['t'] = sigc::bind(sigc::mem_fun(m_download->tracker_list(), &torrent::TrackerList::manual_request), false);
m_bindings['T'] = sigc::bind(sigc::mem_fun(m_download->tracker_list(), &torrent::TrackerList::manual_request), true);
m_bindings['t'] = sigc::bind(sigc::mem_fun(m_download->download(), &torrent::Download::manual_request), false);
m_bindings['T'] = sigc::bind(sigc::mem_fun(m_download->download(), &torrent::Download::manual_request), true);
const char* keys = control->ui()->get_throttle_keys();