summaryrefslogtreecommitdiffstats
path: root/libktorrent
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-03-21 22:55:48 -0500
committerDarrell Anderson <humanreadable@yahoo.com>2012-03-21 22:55:48 -0500
commit5af9907fee05f882f8d2422e47198ebf61d97bb7 (patch)
tree5f31682a2cf6cb479b3170ec6d0d79f382397634 /libktorrent
parentc6c4865cd4bb5b203de3a0db0cc2182b240570d3 (diff)
downloadktorrent-5af9907fee05f882f8d2422e47198ebf61d97bb7.tar.gz
ktorrent-5af9907fee05f882f8d2422e47198ebf61d97bb7.zip
Update ktorrent package to 2.2.8 and fix internal geoip database.
This resolves bug report 363.
Diffstat (limited to 'libktorrent')
-rw-r--r--libktorrent/ktversion.h6
-rw-r--r--libktorrent/torrent/queuemanager.cpp7
-rw-r--r--libktorrent/torrent/queuemanager.h1
-rw-r--r--libktorrent/util/sha1hashgen.cpp5
4 files changed, 11 insertions, 8 deletions
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
{