libtorrent sync 1567, for many fixes, including upnp and run conditions

This commit is contained in:
Marcos Pinto 2007-09-16 07:56:11 +00:00
commit 3f89fd2753
21 changed files with 105 additions and 45 deletions

View file

@ -89,8 +89,15 @@ namespace libtorrent
namespace
{
// The semantic of this operator is:
// shouls lhs come before rhs in the job queue
bool operator<(disk_io_job const& lhs, disk_io_job const& rhs)
{
// NOTE: comparison inverted to make higher priority
// skip _in_front_of_ lower priority
if (lhs.priority > rhs.priority) return true;
if (lhs.priority < rhs.priority) return false;
if (lhs.storage.get() < rhs.storage.get()) return true;
if (lhs.storage.get() > rhs.storage.get()) return false;
if (lhs.piece < rhs.piece) return true;