mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
lt sync 2405
This commit is contained in:
parent
f7010b18f3
commit
d7957f82e7
3 changed files with 14 additions and 6 deletions
|
@ -378,7 +378,8 @@ namespace libtorrent
|
||||||
|
|
||||||
tracker_manager m_tracker_manager;
|
tracker_manager m_tracker_manager;
|
||||||
torrent_map m_torrents;
|
torrent_map m_torrents;
|
||||||
std::list<boost::shared_ptr<torrent> > m_queued_for_checking;
|
typedef std::list<boost::shared_ptr<torrent> > check_queue_t;
|
||||||
|
check_queue_t m_queued_for_checking;
|
||||||
|
|
||||||
// this maps sockets to their peer_connection
|
// this maps sockets to their peer_connection
|
||||||
// object. It is the complete list of all connected
|
// object. It is the complete list of all connected
|
||||||
|
|
|
@ -1005,7 +1005,7 @@ namespace libtorrent
|
||||||
p.set_not_have();
|
p.set_not_have();
|
||||||
|
|
||||||
if (m_dirty) return;
|
if (m_dirty) return;
|
||||||
if (!p.filtered()) add(index);
|
if (p.priority(this) >= 0) add(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is used to indicate that we succesfully have
|
// this is used to indicate that we succesfully have
|
||||||
|
|
|
@ -1771,10 +1771,17 @@ namespace aux {
|
||||||
|
|
||||||
void session_impl::done_checking(boost::shared_ptr<torrent> const& t)
|
void session_impl::done_checking(boost::shared_ptr<torrent> const& t)
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(m_queued_for_checking.front() == t);
|
check_queue_t::iterator next_check = m_queued_for_checking.begin();
|
||||||
m_queued_for_checking.pop_front();
|
check_queue_t::iterator done = m_queued_for_checking.end();
|
||||||
if (!m_queued_for_checking.empty())
|
for (check_queue_t::iterator i = m_queued_for_checking.begin()
|
||||||
m_queued_for_checking.front()->start_checking();
|
, end(m_queued_for_checking.end()); i != end; ++i)
|
||||||
|
{
|
||||||
|
if (*i == t) done = i;
|
||||||
|
if (next_check == done || (*next_check)->queue_position() > (*i)->queue_position())
|
||||||
|
next_check = i;
|
||||||
|
}
|
||||||
|
if (next_check != done) (*next_check)->start_checking();
|
||||||
|
m_queued_for_checking.erase(done);
|
||||||
}
|
}
|
||||||
|
|
||||||
void session_impl::remove_torrent(const torrent_handle& h, int options)
|
void session_impl::remove_torrent(const torrent_handle& h, int options)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue