merged connection_queue patch from RC_0_16

This commit is contained in:
Arvid Norberg 2012-12-10 08:46:14 +00:00
parent 27db5e3f49
commit 70740a0ecd
1 changed files with 8 additions and 11 deletions

View File

@ -80,18 +80,15 @@ namespace libtorrent
entry* e = 0;
switch (priority)
if (priority <= 0)
{
case 0:
m_queue.push_back(entry());
e = &m_queue.back();
break;
case 1:
case 2:
m_queue.push_front(entry());
e = &m_queue.front();
break;
default: return;
m_queue.push_back(entry());
e = &m_queue.back();
}
else // priority > 0
{
m_queue.push_front(entry());
e = &m_queue.front();
}
e->priority = priority;