Fixes for set_queue_position()
This commit is contained in:
parent
fe7dead2df
commit
37df050e3b
|
@ -3417,6 +3417,7 @@ namespace libtorrent
|
|||
torrent* t = i->second.get();
|
||||
if (t == this) continue;
|
||||
if (t->m_sequence_number >= p
|
||||
&& t->m_sequence_number < m_sequence_number
|
||||
&& t->m_sequence_number != -1)
|
||||
++t->m_sequence_number;
|
||||
}
|
||||
|
@ -3429,15 +3430,17 @@ namespace libtorrent
|
|||
, end(torrents.end()); i != end; ++i)
|
||||
{
|
||||
torrent* t = i->second.get();
|
||||
if (t == this) continue;
|
||||
int pos = t->m_sequence_number;
|
||||
if (pos > max_seq) max_seq = pos;
|
||||
if (t == this) continue;
|
||||
|
||||
if (pos <= p
|
||||
&& pos > m_sequence_number
|
||||
&& pos != -1)
|
||||
--t->m_sequence_number;
|
||||
if (pos > max_seq) max_seq = pos;
|
||||
|
||||
}
|
||||
m_sequence_number = (std::min)(max_seq + 1, p);
|
||||
m_sequence_number = (std::min)(max_seq, p);
|
||||
}
|
||||
|
||||
if (m_ses.m_auto_manage_time_scaler > 2)
|
||||
|
|
Loading…
Reference in New Issue