mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 14:49:21 +00:00
* Piece request messages didn't get read when they were the only
message in the buffer, it required an additional byte beyond the size of the request body. * More work on ClientInfo. * Bound 'k' to disconnecting a peer. Consider a better key. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@647 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -171,6 +171,16 @@ Download::receive_prev() {
|
||||
mark_dirty();
|
||||
}
|
||||
|
||||
void
|
||||
Download::receive_disconnect_peer() {
|
||||
if (m_focus == m_peers.end())
|
||||
return;
|
||||
|
||||
m_download->get_download().disconnect_peer(*m_focus);
|
||||
|
||||
mark_dirty();
|
||||
}
|
||||
|
||||
void
|
||||
Download::receive_peer_connected(torrent::Peer p) {
|
||||
m_peers.push_back(p);
|
||||
@@ -250,6 +260,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)['k'] = sigc::mem_fun(*this, &Download::receive_disconnect_peer);
|
||||
|
||||
(*m_bindings)['t'] = sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::tracker_manual_request), false);
|
||||
(*m_bindings)['T'] = sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::tracker_manual_request), true);
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@ private:
|
||||
void receive_next();
|
||||
void receive_prev();
|
||||
|
||||
void receive_disconnect_peer();
|
||||
|
||||
void receive_peer_connected(torrent::Peer p);
|
||||
void receive_peer_disconnected(torrent::Peer p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user