* Set the hash failed flag before DownloadList::hash_clear closes the

torrent, so the hashing queue doesn't re-open it.

* Randomized the starting position in chunk selector.

* Added man page entry for send/receive buffer size.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@689 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-05-15 17:55:11 +00:00
parent d4706da4d5
commit ba4a1927ff
3 changed files with 20 additions and 0 deletions
+10
View File
@@ -739,6 +739,16 @@ gives the client 128 sockets to use as it wishes.
</para></listitem>
</varlistentry>
<varlistentry>
<term>send_buffer_size = <replaceable>value</replaceable></term>
<term>receive_buffer_size = <replaceable>value</replaceable></term>
<listitem><para>
Adjust the send and receive buffer size for socket.
</para></listitem>
</varlistentry>
<varlistentry>
<term>umask = <replaceable>0644</replaceable></term>
<listitem><para>
+7
View File
@@ -432,11 +432,18 @@ void
DownloadList::hash_clear(Download* download) {
check_contains(download);
// Set hash failed so close_throw won't cause the hash queue to
// reopen this download.
download->set_hash_failed(true);
close_throw(download);
download->download()->hash_resume_clear();
download->set_hash_failed(false);
if (download->is_open())
throw torrent::internal_error("DownloadList::hash_clear(...) download still open.");
// If any more stuff is added here, make sure resume etc are still
// correct.
std::for_each(slot_map_hash_queued().begin(), slot_map_hash_queued().end(), download_list_call(download));
+3
View File
@@ -385,6 +385,9 @@ Manager::receive_hashing_changed() {
if ((*itr)->is_hash_checked())
throw torrent::client_error("core::Manager::receive_hashing_changed() hash already checked.");
if ((*itr)->is_hash_failed())
continue;
m_downloadList->open_throw(*itr);
(*itr)->download()->hash_check();