SOURCES: libtorrent-dht_bounds_fix.patch (NEW), libtorrent-fix_cull.patch (...
adamg
adamg at pld-linux.org
Sat Jun 7 20:52:12 CEST 2008
Author: adamg Date: Sat Jun 7 18:52:12 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- new
---- Files affected:
SOURCES:
libtorrent-dht_bounds_fix.patch (NONE -> 1.1) (NEW), libtorrent-fix_cull.patch (NONE -> 1.1) (NEW), libtorrent-fix_dht_target.patch (NONE -> 1.1) (NEW), libtorrent-gcc43.patch (NONE -> 1.1) (NEW), libtorrent-lt-ver.patch (NONE -> 1.1) (NEW), libtorrent-tracker_timer_fix.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/libtorrent-dht_bounds_fix.patch
diff -u /dev/null SOURCES/libtorrent-dht_bounds_fix.patch:1.1
--- /dev/null Sat Jun 7 20:52:12 2008
+++ SOURCES/libtorrent-dht_bounds_fix.patch Sat Jun 7 20:52:06 2008
@@ -0,0 +1,21 @@
+Index: libtorrent/src/dht/dht_router.cc
+===================================================================
+--- libtorrent/src/dht/dht_router.cc (revision 1060)
++++ libtorrent/src/dht/dht_router.cc (working copy)
+@@ -200,14 +200,14 @@
+
+ DhtRouter::DhtBucketList::iterator
+ DhtRouter::find_bucket(const HashString& id) {
+- DhtBucketList::iterator itr = m_routingTable.upper_bound(id);
++ DhtBucketList::iterator itr = m_routingTable.lower_bound(id);
+
+ #ifdef USE_EXTRA_DEBUG
+ if (itr == m_routingTable.end())
+ throw internal_error("DHT Buckets not covering entire ID space.");
+
+ if (!itr->second->is_in_range(id))
+- throw internal_error("DhtRouter::find_bucket, m_routingTable.upper_bound did not find correct bucket.");
++ throw internal_error("DhtRouter::find_bucket, m_routingTable.lower_bound did not find correct bucket.");
+ #endif
+
+ return itr;
================================================================
Index: SOURCES/libtorrent-fix_cull.patch
diff -u /dev/null SOURCES/libtorrent-fix_cull.patch:1.1
--- /dev/null Sat Jun 7 20:52:12 2008
+++ SOURCES/libtorrent-fix_cull.patch Sat Jun 7 20:52:06 2008
@@ -0,0 +1,13 @@
+Index: libtorrent/src/download/download_wrapper.cc
+===================================================================
+--- libtorrent/src/download/download_wrapper.cc (revision 1060)
++++ libtorrent/src/download/download_wrapper.cc (working copy)
+@@ -263,7 +263,7 @@
+ // their memory usage.
+ if (ticks % 120 == 0)
+ // if (ticks % 1 == 0)
+- m_main.peer_list()->cull_peers(PeerList::cull_old || PeerList::cull_keep_interesting);
++ m_main.peer_list()->cull_peers(PeerList::cull_old | PeerList::cull_keep_interesting);
+
+ if (!info()->is_open())
+ return;
================================================================
Index: SOURCES/libtorrent-fix_dht_target.patch
diff -u /dev/null SOURCES/libtorrent-fix_dht_target.patch:1.1
--- /dev/null Sat Jun 7 20:52:12 2008
+++ SOURCES/libtorrent-fix_dht_target.patch Sat Jun 7 20:52:06 2008
@@ -0,0 +1,44 @@
+Index: libtorrent/src/dht/dht_transaction.cc
+===================================================================
+--- libtorrent/src/dht/dht_transaction.cc (revision 1060)
++++ libtorrent/src/dht/dht_transaction.cc (working copy)
+@@ -46,7 +46,7 @@
+ namespace torrent {
+
+ DhtSearch::DhtSearch(const HashString& target, const DhtBucket& contacts)
+- : base_type(dht_compare_closer(target)),
++ : base_type(dht_compare_closer(m_target = target)),
+ m_pending(0),
+ m_contacted(0),
+ m_replied(0),
+Index: libtorrent/src/dht/dht_transaction.h
+===================================================================
+--- libtorrent/src/dht/dht_transaction.h (revision 1060)
++++ libtorrent/src/dht/dht_transaction.h (working copy)
+@@ -77,7 +77,7 @@
+ const HashString& target() const { return m_target; }
+
+ private:
+- HashString m_target;
++ const HashString& m_target;
+ };
+
+ // DhtSearch contains a list of nodes sorted by closeness to the given target,
+@@ -126,7 +126,7 @@
+ bool start() { m_started = true; return m_pending; }
+ bool complete() const { return m_started && !m_pending; }
+
+- const HashString& target() const { return key_comp().target(); }
++ const HashString& target() const { return m_target; }
+
+ virtual bool is_announce() const { return false; }
+
+@@ -158,6 +158,8 @@
+ DhtSearch(const DhtSearch& s);
+
+ bool node_uncontacted(const DhtNode* node) const;
++
++ HashString m_target;
+ };
+
+ class DhtAnnounce : public DhtSearch {
================================================================
Index: SOURCES/libtorrent-gcc43.patch
diff -u /dev/null SOURCES/libtorrent-gcc43.patch:1.1
--- /dev/null Sat Jun 7 20:52:12 2008
+++ SOURCES/libtorrent-gcc43.patch Sat Jun 7 20:52:06 2008
@@ -0,0 +1,89 @@
+diff -Nurp libtorrent-0.12.0.old/rak/functional.h libtorrent-0.12.0/rak/functional.h
+--- libtorrent-0.12.0.old/rak/functional.h 2008-03-09 15:59:49.000000000 +0100
++++ libtorrent-0.12.0/rak/functional.h 2008-03-09 16:00:11.000000000 +0100
+@@ -37,6 +37,7 @@
+ #ifndef RAK_FUNCTIONAL_H
+ #define RAK_FUNCTIONAL_H
+
++#include <cstddef>
+ #include <functional>
+
+ namespace rak {
+diff -Nurp libtorrent-0.12.0.old/src/data/chunk.cc libtorrent-0.12.0/src/data/chunk.cc
+--- libtorrent-0.12.0.old/src/data/chunk.cc 2008-03-09 15:59:49.000000000 +0100
++++ libtorrent-0.12.0/src/data/chunk.cc 2008-03-09 16:00:11.000000000 +0100
+@@ -36,6 +36,7 @@
+
+ #include "config.h"
+
++#include <cstring>
+ #include <algorithm>
+ #include <functional>
+
+diff -Nurp libtorrent-0.12.0.old/src/data/chunk_list.h libtorrent-0.12.0/src/data/chunk_list.h
+--- libtorrent-0.12.0.old/src/data/chunk_list.h 2008-03-09 15:59:49.000000000 +0100
++++ libtorrent-0.12.0/src/data/chunk_list.h 2008-03-09 16:00:11.000000000 +0100
+@@ -38,6 +38,7 @@
+ #define LIBTORRENT_DATA_CHUNK_LIST_H
+
+ #include <vector>
++#include <string>
+ #include <rak/error_number.h>
+ #include <rak/functional.h>
+
+diff -Nurp libtorrent-0.12.0.old/src/net/address_list.cc libtorrent-0.12.0/src/net/address_list.cc
+--- libtorrent-0.12.0.old/src/net/address_list.cc 2008-03-09 15:59:49.000000000 +0100
++++ libtorrent-0.12.0/src/net/address_list.cc 2008-03-09 16:00:11.000000000 +0100
+@@ -36,6 +36,8 @@
+
+ #include "config.h"
+
++#include <algorithm>
++
+ #include <rak/functional.h>
+
+ #include "download/download_info.h" // for SocketAddressCompact
+diff -Nurp libtorrent-0.12.0.old/src/torrent/data/file_list_iterator.h libtorrent-0.12.0/src/torrent/data/file_list_iterator.h
+--- libtorrent-0.12.0.old/src/torrent/data/file_list_iterator.h 2008-03-09 15:59:49.000000000 +0100
++++ libtorrent-0.12.0/src/torrent/data/file_list_iterator.h 2008-03-09 16:00:11.000000000 +0100
+@@ -37,6 +37,7 @@
+ #ifndef LIBTORRENT_FILE_LIST_ITERATOR_H
+ #define LIBTORRENT_FILE_LIST_ITERATOR_H
+
++#include <cstdlib>
+ #include <torrent/common.h>
+ #include <torrent/data/file_list.h>
+
+diff -Nurp libtorrent-0.12.0.old/src/torrent/exceptions.cc libtorrent-0.12.0/src/torrent/exceptions.cc
+--- libtorrent-0.12.0.old/src/torrent/exceptions.cc 2008-03-09 15:59:49.000000000 +0100
++++ libtorrent-0.12.0/src/torrent/exceptions.cc 2008-03-09 16:00:11.000000000 +0100
+@@ -37,6 +37,7 @@
+ #include "config.h"
+
+ #include <cerrno>
++#include <cstring>
+
+ #include "exceptions.h"
+
+diff -Nurp libtorrent-0.12.0.old/src/torrent/tracker_list.h libtorrent-0.12.0/src/torrent/tracker_list.h
+--- libtorrent-0.12.0.old/src/torrent/tracker_list.h 2008-03-09 15:59:49.000000000 +0100
++++ libtorrent-0.12.0/src/torrent/tracker_list.h 2008-03-09 16:01:01.000000000 +0100
+@@ -38,6 +38,7 @@
+ #define LIBTORRENT_TRACKER_LIST_H
+
+ #include <algorithm>
++#include <string>
+ #include <vector>
+ #include <torrent/common.h>
+
+diff -Nurp libtorrent-0.12.0.old/src/utils/diffie_hellman.cc libtorrent-0.12.0/src/utils/diffie_hellman.cc
+--- libtorrent-0.12.0.old/src/utils/diffie_hellman.cc 2008-03-09 15:59:49.000000000 +0100
++++ libtorrent-0.12.0/src/utils/diffie_hellman.cc 2008-03-09 16:00:11.000000000 +0100
+@@ -36,6 +36,7 @@
+
+ #include "config.h"
+
++#include <cstring>
+ #include <string>
+
+ #ifdef USE_OPENSSL
================================================================
Index: SOURCES/libtorrent-lt-ver.patch
diff -u /dev/null SOURCES/libtorrent-lt-ver.patch:1.1
--- /dev/null Sat Jun 7 20:52:12 2008
+++ SOURCES/libtorrent-lt-ver.patch Sat Jun 7 20:52:06 2008
@@ -0,0 +1,15 @@
+Index: libtorrent/configure.ac
+===================================================================
+--- libtorrent/configure.ac (revision 1060)
++++ libtorrent/configure.ac (working copy)
+@@ -5,8 +5,8 @@
+ AC_DEFINE(PEER_VERSION, "lt\x0C\x20", 4 byte client and version identifier for DHT)
+
+ LIBTORRENT_CURRENT=11
+-LIBTORRENT_REVISION=0
+-LIBTORRENT_AGE=2
++LIBTORRENT_REVISION=2
++LIBTORRENT_AGE=0
+
+ LIBTORRENT_INTERFACE_VERSION_INFO=$LIBTORRENT_CURRENT:$LIBTORRENT_REVISION:$LIBTORRENT_AGE
+ LIBTORRENT_INTERFACE_VERSION_NO=$LIBTORRENT_CURRENT.$LIBTORRENT_AGE.$LIBTORRENT_REVISION
================================================================
Index: SOURCES/libtorrent-tracker_timer_fix.patch
diff -u /dev/null SOURCES/libtorrent-tracker_timer_fix.patch:1.1
--- /dev/null Sat Jun 7 20:52:12 2008
+++ SOURCES/libtorrent-tracker_timer_fix.patch Sat Jun 7 20:52:07 2008
@@ -0,0 +1,17 @@
+Index: libtorrent/src/tracker/tracker_manager.cc
+===================================================================
+--- libtorrent/src/tracker/tracker_manager.cc (revision 1060)
++++ libtorrent/src/tracker/tracker_manager.cc (working copy)
+@@ -114,8 +114,11 @@
+ if (m_control->state() == DownloadInfo::STOPPED)
+ throw internal_error("TrackerManager::send_later() m_control->set() == DownloadInfo::STOPPED.");
+
++ rak::timer t(std::max(cachedTime + rak::timer::from_seconds(2),
++ rak::timer::from_seconds(m_control->time_last_connection() + m_control->focus_min_interval())));
++
+ priority_queue_erase(&taskScheduler, &m_taskTimeout);
+- priority_queue_insert(&taskScheduler, &m_taskTimeout, rak::timer::from_seconds(m_control->time_last_connection() + m_control->focus_min_interval()));
++ priority_queue_insert(&taskScheduler, &m_taskTimeout, t);
+ }
+
+ // When request_{current,next} is called, m_isRequesting is set to
================================================================
More information about the pld-cvs-commit
mailing list