From 5af9907fee05f882f8d2422e47198ebf61d97bb7 Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Wed, 21 Mar 2012 22:55:48 -0500 Subject: Update ktorrent package to 2.2.8 and fix internal geoip database. This resolves bug report 363. --- libktorrent/ktversion.h | 6 +++--- libktorrent/torrent/queuemanager.cpp | 7 +++++-- libktorrent/torrent/queuemanager.h | 1 + libktorrent/util/sha1hashgen.cpp | 5 ++--- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'libktorrent') diff --git a/libktorrent/ktversion.h b/libktorrent/ktversion.h index ffe3dbe..494b1be 100644 --- a/libktorrent/ktversion.h +++ b/libktorrent/ktversion.h @@ -27,10 +27,10 @@ namespace kt { const bt::Uint32 MAJOR = 2; const bt::Uint32 MINOR = 2; - const char VERSION_STRING[] = "2.2.6"; - const char PEER_ID[] = "-KT2260-"; + const char VERSION_STRING[] = "2.2.8"; + const char PEER_ID[] = "-KT2280-"; } -#define KT_VERSION_MACRO "2.2.6" +#define KT_VERSION_MACRO "2.2.8" #endif diff --git a/libktorrent/torrent/queuemanager.cpp b/libktorrent/torrent/queuemanager.cpp index 0c76b8a..bf64a2e 100644 --- a/libktorrent/torrent/queuemanager.cpp +++ b/libktorrent/torrent/queuemanager.cpp @@ -49,6 +49,7 @@ namespace bt keep_seeding = true; //test. Will be passed from Core paused_state = false; + ordering = false; } @@ -439,11 +440,13 @@ namespace bt void QueueManager::orderQueue() { - if (!downloads.count()) + if (!downloads.count() || ordering) return; if (paused_state || exiting) return; + + ordering = true; downloads.sort(); @@ -584,7 +587,7 @@ namespace bt } } } - + ordering = false; } void QueueManager::torrentFinished(kt::TorrentInterface* tc) diff --git a/libktorrent/torrent/queuemanager.h b/libktorrent/torrent/queuemanager.h index e49ad44..a51e9ec 100644 --- a/libktorrent/torrent/queuemanager.h +++ b/libktorrent/torrent/queuemanager.h @@ -169,6 +169,7 @@ namespace bt bool paused_state; bool keep_seeding; bool exiting; + bool ordering; }; } #endif diff --git a/libktorrent/util/sha1hashgen.cpp b/libktorrent/util/sha1hashgen.cpp index 5c0d9f5..bacca62 100644 --- a/libktorrent/util/sha1hashgen.cpp +++ b/libktorrent/util/sha1hashgen.cpp @@ -139,12 +139,11 @@ namespace bt { if (i < 16) { - w[i] = ntohl(*(const Uint32*)(chunk + (4*i))); - /* w[i] = (chunk[4*i] << 24) | + // w[i] = ntohl(*(const Uint32*)(chunk + (4*i))); <- crashes on sparc + w[i] = (chunk[4*i] << 24) | (chunk[4*i + 1] << 16) | (chunk[4*i + 2] << 8) | chunk[4*i + 3]; - */ } else { -- cgit v1.2.1