* Enforce an http transfer timeout when libcurl fails to honor

it. Also set a 5-minute timeout for (previously unlimited) torrent
transfers and fixes the argument type for curl_easy_setopt values.

* Allows bandwidth throttles to work without floating point support.

* Adds a d.add_peer=host[:port] command to manually add a peer (not
for torrents marked "private"), port is 6881 by default.

* Allows banning the selected peer with "B". No unbanning is possible
yet.

All the above patches were written by Josef Drexler.

* Differentiate between commands that have no target, and those that
take generic targets, when using XMLRPC.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1073 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2008-10-22 13:23:48 +00:00
parent 85f5b7dc46
commit 29ba4ff4bc
14 changed files with 139 additions and 24 deletions
+12
View File
@@ -75,6 +75,7 @@ ElementPeerList::ElementPeerList(core::Download* d) :
m_bindings['k'] = sigc::mem_fun(this, &ElementPeerList::receive_disconnect_peer);
m_bindings['*'] = sigc::mem_fun(this, &ElementPeerList::receive_snub_peer);
m_bindings['B'] = sigc::mem_fun(this, &ElementPeerList::receive_ban_peer);
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator());
m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_INFO);
@@ -244,6 +245,17 @@ ElementPeerList::receive_snub_peer() {
update_itr();
}
void
ElementPeerList::receive_ban_peer() {
if (m_listItr == m_list.end())
return;
(*m_listItr)->set_banned();
m_download->download()->connection_list()->erase(*m_listItr, torrent::ConnectionList::disconnect_quick);
update_itr();
}
void
ElementPeerList::update_itr() {
m_windowList->mark_dirty();
+1
View File
@@ -75,6 +75,7 @@ private:
void receive_peer_disconnected(torrent::Peer* p);
void receive_snub_peer();
void receive_ban_peer();
void update_itr();