diff --git a/docs/manual.html b/docs/manual.html index 649a429a7..ef1748e00 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -95,128 +95,130 @@
+++void force_recheck() const; ++
force_recheck puts the torrent back in a state where it assumes to have no resume data. +All peers will be disconnected and the torrent will stop announcing to the tracker. The torrent +will be added to the checking queue, and will be checked (all the files will be read and +compared to the piece hashes). Once the check is complete, the torrent will start connecting +to peers again, as normal.
+@@ -2979,9 +2995,17 @@ sent to peers (including web seeds). The default value for this is 0x20, this represents the QBone scavenger service. For more details, see QBSS.active_downloads and active_seeds controls how many active seeding and -downloading torrents the queuing mechanism allows. Seeding torrents are -counted against the downloads limit but downloading torrenst are not -counted against the seed limit.
+downloading torrents the queuing mechanism allows. The target number of active +torrents is max(active_downloads, active_seeds). active_downloads and +active_seeds are upper limits on the number of downloading torrents and +seeding torrents respectively. +For example if there are 10 seeding torrents and 10 downloading torrents, and +active_downloads is 4 and active_seeds is 4, there will be no seed +active, but 4 downloading torrents. If the settings are active_downloads = 2 +and active_seeds = 4, then there will be 2 downloading torrenst and 2 seeding +torrents active. Torrents that are not auto managed are also counted against these +limits. If there are non-auto managed torrents that use up all the slots, no +auto managed torrent will be activated.
auto_manage_interval is the number of seconds between the torrent queue is updated, and rotated.
share_ratio_limit is the upload / download ratio limit for considering a @@ -4053,6 +4077,18 @@ struct save_resume_data_alert: torrent_alert
This alert is generated as a response to a torrent_handle::resume request. It is +generated when a torrent goes from a paused state to an active state.
++struct torrent_resumed_alert: torrent_alert +{ + torrent_resumed_alert(torrent_handle const& h, std::string const& msg); + virtual std::auto_ptr<alert> clone() const; +}; ++
The handle_alert class is defined in <libtorrent/alert.hpp>.
Examples usage:
diff --git a/docs/manual.rst b/docs/manual.rst index a16c83c7b..c9537554c 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -3018,9 +3018,18 @@ the *QBone scavenger service*. For more details, see QBSS_. .. _`QBSS`: http://qbone.internet2.edu/qbss/ ``active_downloads`` and ``active_seeds`` controls how many active seeding and -downloading torrents the queuing mechanism allows. Seeding torrents are -counted against the downloads limit but downloading torrenst are not -counted against the seed limit. +downloading torrents the queuing mechanism allows. The target number of active +torrents is ``max(active_downloads, active_seeds)``. ``active_downloads`` and +``active_seeds`` are upper limits on the number of downloading torrents and +seeding torrents respectively. + +For example if there are 10 seeding torrents and 10 downloading torrents, and +``active_downloads`` is 4 and ``active_seeds`` is 4, there will be no seed +active, but 4 downloading torrents. If the settings are ``active_downloads`` = 2 +and ``active_seeds`` = 4, then there will be 2 downloading torrenst and 2 seeding +torrents active. Torrents that are not auto managed are also counted against these +limits. If there are non-auto managed torrents that use up all the slots, no +auto managed torrent will be activated. ``auto_manage_interval`` is the number of seconds between the torrent queue is updated, and rotated. @@ -4224,7 +4233,7 @@ The ``resume_data`` member points to the resume data or is 0 on errors. }; torrent_resumed_alert --------------------- +--------------------- This alert is generated as a response to a ``torrent_handle::resume`` request. It is generated when a torrent goes from a paused state to an active state. diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 9e9cabb83..388434ebd 100755 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1327,15 +1327,8 @@ namespace aux { // this is not an auto managed torrent, // if it's running, decrease the respective // counters. - if (t->is_finished()) - { - --num_seeds; - --num_downloaders; - } - else - { - --num_downloaders; - } + --num_downloaders; + --num_seeds; } } @@ -1362,6 +1355,7 @@ namespace aux { if (num_downloaders > 0) { --num_downloaders; + --num_seeds; if (t->is_paused()) t->resume(); } else @@ -1374,7 +1368,7 @@ namespace aux { , end(seeds.end()); i != end; ++i) { torrent* t = *i; - if (num_downloaders > 0 && num_seeds > 0) + if (num_seeds > 0) { --num_downloaders; --num_seeds;