* The "tos" option was parsing the hex value with unit == 0, which

caused it to always zero it.

* Split the chunks in the transfer list to fit the display. Patch by
Josef Drexler.

* Forgot to check if there were any torrents hashing before starting
new non-fast-resume checks, which would cause multiple torrents to be
hashed at once.

* File progress is now updated when hash_check is called, and no
longer cleared on close. This fixes a bug with >100% file progress
being reported and optimizes file progress updating for completed
torrents.

* Disabled IPv6 http requests so the trackers won't think we support
it.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@857 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-02-09 16:39:51 +00:00
parent cdd2da8df5
commit ef3ecb0b97
5 changed files with 16 additions and 9 deletions
+1
View File
@@ -81,6 +81,7 @@ CurlGet::start() {
curl_easy_setopt(m_handle, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(m_handle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(m_handle, CURLOPT_MAXREDIRS, 5);
curl_easy_setopt(m_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
m_stack->add_get(this);
}
+3 -7
View File
@@ -488,7 +488,8 @@ Manager::try_create_download_expand(const std::string& uri, bool start, bool pri
// hashing view and starts hashing if nessesary.
void
Manager::receive_hashing_changed() {
bool foundHashing = false;
bool foundHashing = std::find_if(m_hashingView->begin_visible(), m_hashingView->end_visible(),
std::mem_fun(&Download::is_hash_checking)) != m_hashingView->end_visible();
// Try quick hashing all those with hashing == initial, set them to
// something else when failed.
@@ -496,12 +497,7 @@ Manager::receive_hashing_changed() {
if ((*itr)->is_hash_checked())
throw torrent::internal_error("core::Manager::receive_hashing_changed() (*itr)->is_hash_checked().");
if ((*itr)->is_hash_checking()) {
foundHashing = true;
continue;
}
if ((*itr)->is_hash_failed())
if ((*itr)->is_hash_checking() || (*itr)->is_hash_failed())
continue;
bool tryQuick =
+8 -1
View File
@@ -78,6 +78,13 @@ WindowDownloadTransferList::redraw() {
// Handle window size.
for (torrent::BlockList::const_iterator bItr = (*itr)->begin(), bLast = (*itr)->end(); bItr != bLast; ++bItr) {
if (m_canvas->get_x() >= m_canvas->width() - 1) {
if (++y >= m_canvas->height())
break;
m_canvas->move(17, y);
}
char id;
chtype attr = A_NORMAL;
@@ -100,7 +107,7 @@ WindowDownloadTransferList::redraw() {
attr |= A_UNDERLINE;
m_canvas->print_char(attr | id);
}
}
}
}
+1 -1
View File
@@ -320,7 +320,7 @@ apply_tos(const std::string& arg) {
else if (arg == "mincost")
value = torrent::ConnectionManager::iptos_mincost;
else if (!utils::Variable::string_to_value_unit_nothrow(arg.c_str(), &value, 16, 0))
else if (!utils::Variable::string_to_value_unit_nothrow(arg.c_str(), &value, 16, 1))
throw torrent::input_error("Invalid TOS identifier.");
cm->set_priority(value);
+3
View File
@@ -66,6 +66,9 @@ Variable::set_d(core::Download* download, const torrent::Object& arg) {
const char*
Variable::string_to_value_unit(const char* pos, value_type* value, int base, int unit) {
if (unit <= 0)
throw torrent::input_error("Variable::string_to_value_unit(...) received unit <= 0.");
char* last;
*value = strtoll(pos, &last, base);