mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-20 16:16:17 +00:00
* Added the ability to set the timeout in torrent::Http. Torrent
downloads now have longer timeout than tracker requests. * Bound the '*' key in tracker list to disable a tracker. * Added PollKQueue placeholder, implementation will come later. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@598 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -8,6 +8,7 @@ sinclude(scripts/common.m4)
|
|||||||
|
|
||||||
TORRENT_CHECK_CXXFLAGS()
|
TORRENT_CHECK_CXXFLAGS()
|
||||||
TORRENT_ENABLE_DEBUG()
|
TORRENT_ENABLE_DEBUG()
|
||||||
|
TORRENT_ENABLE_EXTRA_DEBUG()
|
||||||
TORRENT_ENABLE_WERROR()
|
TORRENT_ENABLE_WERROR()
|
||||||
|
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
|||||||
@@ -84,8 +84,11 @@ CurlGet::start() {
|
|||||||
curl_easy_setopt(m_handle, CURLOPT_URL, m_url.c_str());
|
curl_easy_setopt(m_handle, CURLOPT_URL, m_url.c_str());
|
||||||
curl_easy_setopt(m_handle, CURLOPT_WRITEFUNCTION, &curl_get_receive_write);
|
curl_easy_setopt(m_handle, CURLOPT_WRITEFUNCTION, &curl_get_receive_write);
|
||||||
curl_easy_setopt(m_handle, CURLOPT_WRITEDATA, this);
|
curl_easy_setopt(m_handle, CURLOPT_WRITEDATA, this);
|
||||||
curl_easy_setopt(m_handle, CURLOPT_CONNECTTIMEOUT, 60);
|
|
||||||
curl_easy_setopt(m_handle, CURLOPT_TIMEOUT, 360);
|
if (m_timeout != 0) {
|
||||||
|
curl_easy_setopt(m_handle, CURLOPT_CONNECTTIMEOUT, 60);
|
||||||
|
curl_easy_setopt(m_handle, CURLOPT_TIMEOUT, m_timeout);
|
||||||
|
}
|
||||||
|
|
||||||
curl_easy_setopt(m_handle, CURLOPT_FORBID_REUSE, 1);
|
curl_easy_setopt(m_handle, CURLOPT_FORBID_REUSE, 1);
|
||||||
curl_easy_setopt(m_handle, CURLOPT_NOSIGNAL, 1);
|
curl_easy_setopt(m_handle, CURLOPT_NOSIGNAL, 1);
|
||||||
|
|||||||
@@ -82,9 +82,12 @@ WindowStatusbar::redraw() {
|
|||||||
(int)torrent::listen_port(),
|
(int)torrent::listen_port(),
|
||||||
!torrent::bind_address().empty() ? (" Bind: " + torrent::bind_address()).c_str() : "");
|
!torrent::bind_address().empty() ? (" Bind: " + torrent::bind_address()).c_str() : "");
|
||||||
|
|
||||||
// pos = snprintf(buf, 128, "[U %i/%i][S %i/%i/%i][F %i/%i]",
|
#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]",
|
pos = snprintf(buf, 128, "%i [U %i/%i][S %i/%i/%i][F %i/%i]",
|
||||||
countTicks,
|
countTicks,
|
||||||
|
#endif
|
||||||
torrent::currently_unchoked(),
|
torrent::currently_unchoked(),
|
||||||
torrent::max_unchoked(),
|
torrent::max_unchoked(),
|
||||||
torrent::total_handshakes(),
|
torrent::total_handshakes(),
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ ElementTrackerList::ElementTrackerList(core::Download* d) :
|
|||||||
m_bindings[KEY_DOWN] = sigc::mem_fun(*this, &ElementTrackerList::receive_next);
|
m_bindings[KEY_DOWN] = sigc::mem_fun(*this, &ElementTrackerList::receive_next);
|
||||||
m_bindings[KEY_UP] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev);
|
m_bindings[KEY_UP] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev);
|
||||||
m_bindings[' '] = sigc::mem_fun(*this, &ElementTrackerList::receive_cycle_group);
|
m_bindings[' '] = sigc::mem_fun(*this, &ElementTrackerList::receive_cycle_group);
|
||||||
|
m_bindings['*'] = sigc::mem_fun(*this, &ElementTrackerList::receive_disable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -77,6 +78,19 @@ ElementTrackerList::disable(Control* c) {
|
|||||||
m_window = NULL;
|
m_window = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ElementTrackerList::receive_disable() {
|
||||||
|
if (m_window == NULL)
|
||||||
|
throw std::logic_error("ui::ElementTrackerList::receive_disable(...) called on a disabled object");
|
||||||
|
|
||||||
|
if (m_download->get_download().tracker(m_focus).is_enabled())
|
||||||
|
m_download->get_download().tracker(m_focus).disable();
|
||||||
|
else
|
||||||
|
m_download->get_download().tracker(m_focus).enable();
|
||||||
|
|
||||||
|
m_window->mark_dirty();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ElementTrackerList::receive_next() {
|
ElementTrackerList::receive_next() {
|
||||||
if (m_window == NULL)
|
if (m_window == NULL)
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ private:
|
|||||||
void receive_next();
|
void receive_next();
|
||||||
void receive_prev();
|
void receive_prev();
|
||||||
|
|
||||||
|
void receive_disable();
|
||||||
|
|
||||||
void receive_cycle_group();
|
void receive_cycle_group();
|
||||||
|
|
||||||
core::Download* m_download;
|
core::Download* m_download;
|
||||||
|
|||||||
Reference in New Issue
Block a user