summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2009-12-22 20:24:25 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2009-12-22 20:24:25 +0000
commit57840cca73922d8ad821eed10ff6042cb8b61886 (patch)
treed078f04c997c05812aac72d3149219069060c037 /net-libs/libtorrent/files
parentInitial import, bug 291653. Thanks to Franz Glauber Vanderlinde. (diff)
downloadhistorical-57840cca73922d8ad821eed10ff6042cb8b61886.tar.gz
historical-57840cca73922d8ad821eed10ff6042cb8b61886.tar.bz2
historical-57840cca73922d8ad821eed10ff6042cb8b61886.zip
old
Package-Manager: portage-2.2_rc60/cvs/Linux x86_64
Diffstat (limited to 'net-libs/libtorrent/files')
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.11.9+gcc-4.3.patch89
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-dht_bounds_fix.patch21
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-fix_cull.patch13
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-fix_dht-get_peers.patch140
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-fix_dht_target.patch44
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-fix_have_timer.patch47
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-fix_pex_leak.patch102
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-fix_start_stop_filter.patch19
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-fix_write_datagram.patch13
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-lt-ver.patch15
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.2-tracker_timer_fix.patch17
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.3-fix-epoll-crash.patch33
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch16
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.3-fix-poll_fd.patch230
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch49
15 files changed, 0 insertions, 848 deletions
diff --git a/net-libs/libtorrent/files/libtorrent-0.11.9+gcc-4.3.patch b/net-libs/libtorrent/files/libtorrent-0.11.9+gcc-4.3.patch
deleted file mode 100644
index 1090cf550149..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.11.9+gcc-4.3.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-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
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-dht_bounds_fix.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-dht_bounds_fix.patch
deleted file mode 100644
index f1f8cf91552a..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-dht_bounds_fix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-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;
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_cull.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-fix_cull.patch
deleted file mode 100644
index 7a6c8499b5ab..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_cull.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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;
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_dht-get_peers.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-fix_dht-get_peers.patch
deleted file mode 100644
index b447749f9495..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_dht-get_peers.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-# Fixes an interoperability issue in the get_peers handling, now it
-# behaves according to the clarified BEP-0005. Also fixes a minor
-# issue of not being able to generate error packets.
-Index: libtorrent/src/dht/dht_tracker.h
-===================================================================
---- libtorrent/src/dht/dht_tracker.h (revision 1063)
-+++ libtorrent/src/dht/dht_tracker.h (working copy)
-@@ -65,7 +65,7 @@
- size_t size() const { return m_peers.size(); }
-
- void add_peer(uint32_t addr, uint16_t port);
-- std::string get_peers(unsigned int maxPeers = max_peers);
-+ Object get_peers(unsigned int maxPeers = max_peers);
-
- // Remove old announces from the tracker that have not reannounced for
- // more than the given number of seconds.
-Index: libtorrent/src/dht/dht_transaction.cc
-===================================================================
---- libtorrent/src/dht/dht_transaction.cc (revision 1063)
-+++ libtorrent/src/dht/dht_transaction.cc (working copy)
-@@ -252,7 +252,7 @@
- }
-
- void
--DhtAnnounce::receive_peers(const std::string& peers) {
-+DhtAnnounce::receive_peers(const Object& peers) {
- m_tracker->receive_peers(peers);
- }
-
-Index: libtorrent/src/dht/dht_server.cc
-===================================================================
---- libtorrent/src/dht/dht_server.cc (revision 1063)
-+++ libtorrent/src/dht/dht_server.cc (working copy)
-@@ -302,8 +302,7 @@
- reply.insert_key("nodes", std::string(compact, end));
-
- } else {
-- Object& values = reply.insert_key("values", Object::create_list());
-- values.insert_back(tracker->get_peers());
-+ reply.insert_key("values", Object::create_list()).as_list().swap(tracker->get_peers().as_list());
- }
- }
-
-@@ -417,7 +416,7 @@
- transaction->complete(true);
-
- if (response.has_key_list("values"))
-- announce->receive_peers((*response.get_key_list("values").begin()).as_string());
-+ announce->receive_peers(response.get_key("values"));
-
- if (response.has_key_string("token"))
- add_transaction(new DhtTransactionAnnouncePeer(transaction->id(), transaction->address(), announce->target(), response.get_key_string("token")), packet_prio_low);
-@@ -641,6 +640,7 @@
- sstream.imbue(std::locale::classic());
-
- while (true) {
-+ Object request;
- rak::socket_address sa;
- int type = '?';
- const Object* transactionId = NULL;
-@@ -656,7 +656,6 @@
- total += read;
- sstream.str(std::string(buffer, read));
-
-- Object request;
- sstream >> request;
-
- // If it's not a valid bencode dictionary at all, it's probably not a DHT
-Index: libtorrent/src/dht/dht_transaction.h
-===================================================================
---- libtorrent/src/dht/dht_transaction.h (revision 1063)
-+++ libtorrent/src/dht/dht_transaction.h (working copy)
-@@ -178,7 +178,7 @@
- // counts announces instead.
- const_accessor start_announce();
-
-- void receive_peers(const std::string& peers);
-+ void receive_peers(const Object& peer_list);
- void update_status();
-
- private:
-Index: libtorrent/src/dht/dht_tracker.cc
-===================================================================
---- libtorrent/src/dht/dht_tracker.cc (revision 1063)
-+++ libtorrent/src/dht/dht_tracker.cc (working copy)
-@@ -79,7 +79,7 @@
-
- // Return compact info (6 bytes) for up to 30 peers, returning different
- // peers for each call if there are more.
--std::string
-+Object
- DhtTracker::get_peers(unsigned int maxPeers) {
- PeerList::iterator first = m_peers.begin();
- PeerList::iterator last = m_peers.end();
-@@ -94,7 +94,11 @@
- last = first + maxPeers;
- }
-
-- return std::string(first->c_str(), last->c_str());
-+ Object peers = Object::create_list();
-+ for (; first != last; ++first)
-+ peers.insert_back(std::string(first->c_str(), sizeof(*first)));
-+
-+ return peers;
- }
-
- // Remove old announces.
-Index: libtorrent/src/tracker/tracker_dht.h
-===================================================================
---- libtorrent/src/tracker/tracker_dht.h (revision 1063)
-+++ libtorrent/src/tracker/tracker_dht.h (working copy)
-@@ -71,7 +71,7 @@
-
- bool has_peers() const { return !m_peers.empty(); }
-
-- void receive_peers(const std::string& peers);
-+ void receive_peers(const Object& peer_list);
- void receive_success();
- void receive_failed(const char* msg);
- void receive_progress(int replied, int contacted);
-Index: libtorrent/src/tracker/tracker_dht.cc
-===================================================================
---- libtorrent/src/tracker/tracker_dht.cc (revision 1063)
-+++ libtorrent/src/tracker/tracker_dht.cc (working copy)
-@@ -114,11 +114,13 @@
- }
-
- void
--TrackerDht::receive_peers(const std::string& peers) {
-+TrackerDht::receive_peers(const Object& peer_list) {
- if (!is_busy())
- throw internal_error("TrackerDht::receive_peers called while not busy.");
-
-- m_peers.parse_address_compact(peers);
-+ Object::list_type peers = peer_list.as_list();
-+ for (Object::list_type::const_iterator itr = peers.begin(); itr != peers.end(); ++itr)
-+ m_peers.parse_address_compact(itr->as_string());
- }
-
- void
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_dht_target.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-fix_dht_target.patch
deleted file mode 100644
index 88a281bf3eab..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_dht_target.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-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 {
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_have_timer.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-fix_have_timer.patch
deleted file mode 100644
index c42c3f925885..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_have_timer.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Index: libtorrent/src/protocol/handshake_manager.cc
-===================================================================
---- libtorrent/src/protocol/handshake_manager.cc (revision 1060)
-+++ libtorrent/src/protocol/handshake_manager.cc (working copy)
-@@ -208,13 +208,13 @@
- e_none,
- &download->info()->hash());
-
-+ pcb->peer_chunks()->set_have_timer(handshake->initialized_time());
-+
- if (handshake->unread_size() != 0) {
- if (handshake->unread_size() > PeerConnectionBase::ProtocolRead::buffer_size)
- throw internal_error("HandshakeManager::receive_succeeded(...) Unread data won't fit PCB's read buffer.");
-
- pcb->push_unread(handshake->unread_data(), handshake->unread_size());
-- pcb->peer_chunks()->set_have_timer(handshake->initialized_time());
--
- pcb->event_read();
- }
-
-Index: libtorrent/src/protocol/handshake.cc
-===================================================================
---- libtorrent/src/protocol/handshake.cc (revision 1060)
-+++ libtorrent/src/protocol/handshake.cc (working copy)
-@@ -86,8 +86,6 @@
- m_uploadThrottle(manager->upload_throttle()->throttle_list()),
- m_downloadThrottle(manager->download_throttle()->throttle_list()),
-
-- m_initializedTime(cachedTime),
--
- m_readDone(false),
- m_writeDone(false),
-
-@@ -524,6 +522,13 @@
- if (m_peerInfo->supports_extensions())
- write_extension_handshake();
-
-+ // Replay HAVE messages we receive after starting to send the bitfield.
-+ // This avoids replaying HAVEs for pieces received between starting the
-+ // handshake and now (e.g. when connecting takes longer). Ideally we
-+ // should make a snapshot of the bitfield here in case it changes while
-+ // we're sending it (if it can't be sent in one write() call).
-+ m_initializedTime = cachedTime;
-+
- // The download is just starting so we're not sending any
- // bitfield. Pretend we wrote it already.
- if (m_download->file_list()->bitfield()->is_all_unset() || m_download->initial_seeding() != NULL) {
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_pex_leak.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-fix_pex_leak.patch
deleted file mode 100644
index 91bdc5fdfea9..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_pex_leak.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-Index: libtorrent/src/net/data_buffer.h
-===================================================================
---- libtorrent/src/net/data_buffer.h (revision 1026)
-+++ libtorrent/src/net/data_buffer.h (working copy)
-@@ -44,26 +44,28 @@
-
- // Recipient must call clear() when done with the buffer.
- struct DataBuffer {
-- DataBuffer() : m_data(NULL), m_end(NULL), m_copied(false) {}
-- DataBuffer(char* data, char* end) : m_data(data), m_end(end), m_copied(false) {}
-+ DataBuffer() : m_data(NULL), m_end(NULL), m_owned(true) {}
-+ DataBuffer(char* data, char* end) : m_data(data), m_end(end), m_owned(true) {}
-
-+ DataBuffer clone() const { DataBuffer d = *this; d.m_owned = false; return d; }
-+
- char* data() const { return m_data; }
- char* end() const { return m_end; }
-
-- bool copied() const { return m_copied; }
-+ bool owned() const { return m_owned; }
- bool empty() const { return m_data == NULL; }
- size_t length() const { return m_end - m_data; }
-
- void clear();
-- void set(char* data, char* end, bool copied);
-+ void set(char* data, char* end, bool owned);
-
- private:
- char* m_data;
- char* m_end;
-
-- // Used to indicate if buffer held by PCB is copied and needs to be
-- // deleted after transmission.
-- bool m_copied;
-+ // Used to indicate if buffer held by PCB is its own and needs to be
-+ // deleted after transmission (false if shared with other connections).
-+ bool m_owned;
- };
-
- inline void
-@@ -72,14 +74,14 @@
- delete[] m_data;
-
- m_data = m_end = NULL;
-- m_copied = false;
-+ m_owned = false;
- }
-
- inline void
--DataBuffer::set(char* data, char* end, bool copied) {
-+DataBuffer::set(char* data, char* end, bool owned) {
- m_data = data;
- m_end = end;
-- m_copied = copied;
-+ m_owned = owned;
- }
-
- }
-Index: libtorrent/src/protocol/peer_connection_base.cc
-===================================================================
---- libtorrent/src/protocol/peer_connection_base.cc (revision 1026)
-+++ libtorrent/src/protocol/peer_connection_base.cc (working copy)
-@@ -92,7 +92,7 @@
- if (m_extensions != NULL && !m_extensions->is_default())
- delete m_extensions;
-
-- if (m_extensionMessage.copied())
-+ if (m_extensionMessage.owned())
- m_extensionMessage.clear();
- }
-
-@@ -665,7 +665,7 @@
- bool
- PeerConnectionBase::up_extension() {
- if (m_extensionOffset == extension_must_encrypt) {
-- if (m_extensionMessage.copied()) {
-+ if (m_extensionMessage.owned()) {
- m_encryption.encrypt(m_extensionMessage.data(), m_extensionMessage.length());
-
- } else {
-@@ -690,7 +690,7 @@
-
- // clear() deletes the buffer, only do that if we made a copy,
- // otherwise the buffer is shared among all connections.
-- if (m_extensionMessage.copied())
-+ if (m_extensionMessage.owned())
- m_extensionMessage.clear();
- else
- m_extensionMessage.set(NULL, NULL, false);
-Index: libtorrent/src/download/download_main.h
-===================================================================
---- libtorrent/src/download/download_main.h (revision 1026)
-+++ libtorrent/src/download/download_main.h (working copy)
-@@ -105,7 +105,7 @@
- ThrottleList* download_throttle() { return m_downloadThrottle; }
- void set_download_throttle(ThrottleList* t) { m_downloadThrottle = t; }
-
-- DataBuffer get_ut_pex(bool initial) { return initial ? m_ut_pex_initial : m_ut_pex_delta; }
-+ DataBuffer get_ut_pex(bool initial) { return (initial ? m_ut_pex_initial : m_ut_pex_delta).clone(); }
-
- bool want_pex_msg() { return m_info->is_pex_active() && m_peerList.available_list()->want_more(); };
-
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_start_stop_filter.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-fix_start_stop_filter.patch
deleted file mode 100644
index 2f9267821104..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_start_stop_filter.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: rtorrent/src/main.cc
-===================================================================
---- rtorrent/src/main.cc (revision 1060)
-+++ rtorrent/src/main.cc (working copy)
-@@ -187,12 +187,12 @@
- "view_filter = active,false=\n"
-
- "view_add = started\n"
-- "view_filter = started,false=\n"
-+ "view_filter = started,d.get_state=\n"
- "view.event_added = started,scheduler.simple.added=\n"
- "view.event_removed = started,scheduler.simple.removed=\n"
-
- "view_add = stopped\n"
-- "view_filter = stopped,false=\n"
-+ "view_filter = stopped,not=$d.get_state=\n"
-
- "view_add = complete\n"
- "view_filter = complete,d.get_complete=\n"
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_write_datagram.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-fix_write_datagram.patch
deleted file mode 100644
index f89cd0f26d39..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-fix_write_datagram.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: libtorrent/src/net/socket_datagram.cc
-===================================================================
---- libtorrent/src/net/socket_datagram.cc (revision 1060)
-+++ libtorrent/src/net/socket_datagram.cc (working copy)
-@@ -73,7 +73,7 @@
- int r;
-
- if (sa != NULL) {
-- r = ::sendto(m_fileDesc, buffer, length, 0, sa->c_sockaddr(), sizeof(rak::socket_address));
-+ r = ::sendto(m_fileDesc, buffer, length, 0, sa->sa_inet()->c_sockaddr(), sizeof(rak::socket_address_inet));
- } else {
- r = ::send(m_fileDesc, buffer, length, 0);
- }
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-lt-ver.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-lt-ver.patch
deleted file mode 100644
index 6408095965dd..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-lt-ver.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-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
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.2-tracker_timer_fix.patch b/net-libs/libtorrent/files/libtorrent-0.12.2-tracker_timer_fix.patch
deleted file mode 100644
index 28a7c925c5b2..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.2-tracker_timer_fix.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-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
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.3-fix-epoll-crash.patch b/net-libs/libtorrent/files/libtorrent-0.12.3-fix-epoll-crash.patch
deleted file mode 100644
index 214c78570c04..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.3-fix-epoll-crash.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-# Fixes a crash in epoll due to libcurl/c-ares bug:
-# PollEPoll::modify(...) epoll_ctl call failed
-Index: libtorrent/src/torrent/poll_epoll.cc
-===================================================================
---- libtorrent/src/torrent/poll_epoll.cc (revision 1067)
-+++ libtorrent/src/torrent/poll_epoll.cc (working copy)
-@@ -75,12 +75,21 @@
-
- set_event_mask(event, mask);
-
-- // If error is EEXIST, try again with EPOLL_CTL_MOD.
-- // libcurl with c-ares may unwittingly re-open an FD closed by
-- // c-ares before notified (and thus notifying us) of its closure.
- if (epoll_ctl(m_fd, op, event->file_descriptor(), &e)) {
-- if (op != EPOLL_CTL_ADD || errno != EEXIST ||
-- epoll_ctl(m_fd, EPOLL_CTL_MOD, event->file_descriptor(), &e))
-+ // Socket was probably already closed. Ignore this.
-+ if (op == EPOLL_CTL_DEL && errno == ENOENT)
-+ return;
-+
-+ // Handle some libcurl/c-ares bugs by retrying once.
-+ if (op == EPOLL_CTL_ADD && errno == EEXIST) {
-+ op = EPOLL_CTL_MOD;
-+ errno = 0;
-+ } else if (op == EPOLL_CTL_MOD && errno == ENOENT) {
-+ op = EPOLL_CTL_ADD;
-+ errno = 0;
-+ }
-+
-+ if (errno || epoll_ctl(m_fd, op, event->file_descriptor(), &e))
- throw internal_error("PollEPoll::modify(...) epoll_ctl call failed");
- }
- }
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch b/net-libs/libtorrent/files/libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch
deleted file mode 100644
index 57fa0f8b9788..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-# Fixes a crash with fill_read_buffer(...) Buffer overflow" if peer sends
-# both encryption pads and their total size does not allow the subsequent
-# bitfield/protocol message to be received correctly. Ticket #1337.
-Index: libtorrent/src/protocol/handshake.h
-===================================================================
---- libtorrent/src/protocol/handshake.h (revision 1073)
-+++ libtorrent/src/protocol/handshake.h (working copy)
-@@ -66,7 +66,7 @@
- static const uint32_t enc_pad_size = 512;
- static const uint32_t enc_pad_read_size = 96 + enc_pad_size + 20;
-
-- static const uint32_t buffer_size = enc_pad_read_size + 20 + enc_negotiation_size + enc_pad_size + 2 + handshake_size;
-+ static const uint32_t buffer_size = enc_pad_read_size + 20 + enc_negotiation_size + enc_pad_size + 2 + handshake_size + 5;
-
- typedef ProtocolBuffer<buffer_size> Buffer;
-
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.3-fix-poll_fd.patch b/net-libs/libtorrent/files/libtorrent-0.12.3-fix-poll_fd.patch
deleted file mode 100644
index 2d6d7afc87b4..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.3-fix-poll_fd.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-# Changes epoll/kqueue to operate by file descriptors, not
-# event pointers, to hopefully fix the recent poll crashes.
-Index: libtorrent/src/torrent/poll_epoll.cc
-===================================================================
---- libtorrent/src/torrent/poll_epoll.cc (revision 1072)
-+++ libtorrent/src/torrent/poll_epoll.cc (working copy)
-@@ -37,6 +37,7 @@
- #include "config.h"
-
- #include <cerrno>
-+#include <cstring>
-
- #include <unistd.h>
- #include <torrent/exceptions.h>
-@@ -60,7 +61,7 @@
-
- inline void
- PollEPoll::set_event_mask(Event* e, uint32_t m) {
-- m_table[e->file_descriptor()] = std::make_pair(m, e);
-+ m_table[e->file_descriptor()] = Table::value_type(m, e);
- }
-
- inline void
-@@ -70,7 +71,7 @@
-
- epoll_event e;
- e.data.u64 = 0; // Make valgrind happy? Remove please.
-- e.data.ptr = event;
-+ e.data.fd = event->file_descriptor();
- e.events = mask;
-
- set_event_mask(event, mask);
-@@ -81,16 +82,20 @@
- return;
-
- // Handle some libcurl/c-ares bugs by retrying once.
-+ int retry = op;
- if (op == EPOLL_CTL_ADD && errno == EEXIST) {
-- op = EPOLL_CTL_MOD;
-+ retry = EPOLL_CTL_MOD;
- errno = 0;
- } else if (op == EPOLL_CTL_MOD && errno == ENOENT) {
-- op = EPOLL_CTL_ADD;
-+ retry = EPOLL_CTL_ADD;
- errno = 0;
- }
-
-- if (errno || epoll_ctl(m_fd, op, event->file_descriptor(), &e))
-- throw internal_error("PollEPoll::modify(...) epoll_ctl call failed");
-+ if (errno || epoll_ctl(m_fd, retry, event->file_descriptor(), &e)) {
-+ char errmsg[1024];
-+ snprintf(errmsg, sizeof(errmsg), "PollEPoll::modify(...) epoll_ctl(%d, %d -> %d, %d, [%p:%x]) = %d: %s", m_fd, op, retry, event->file_descriptor(), event, mask, errno, strerror(errno));
-+ throw internal_error(errmsg);
-+ }
- }
- }
-
-@@ -138,20 +143,25 @@
- void
- PollEPoll::perform() {
- for (epoll_event *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr) {
-+ if (itr->data.fd < 0 || (size_t)itr->data.fd >= m_table.size())
-+ continue;
-+
-+ Table::iterator evItr = m_table.begin() + itr->data.fd;
-+
- // Each branch must check for data.ptr != NULL to allow the socket
- // to remove itself between the calls.
- //
- // TODO: Make it so that it checks that read/write is wanted, that
- // it wasn't removed from one of them but not closed.
-
-- if (itr->events & EPOLLERR && itr->data.ptr != NULL && event_mask((Event*)itr->data.ptr) & EPOLLERR)
-- ((Event*)itr->data.ptr)->event_error();
-+ if (itr->events & EPOLLERR && evItr->second != NULL && evItr->first & EPOLLERR)
-+ evItr->second->event_error();
-
-- if (itr->events & EPOLLIN && itr->data.ptr != NULL && event_mask((Event*)itr->data.ptr) & EPOLLIN)
-- ((Event*)itr->data.ptr)->event_read();
-+ if (itr->events & EPOLLIN && evItr->second != NULL && evItr->first & EPOLLIN)
-+ evItr->second->event_read();
-
-- if (itr->events & EPOLLOUT && itr->data.ptr != NULL && event_mask((Event*)itr->data.ptr) & EPOLLOUT)
-- ((Event*)itr->data.ptr)->event_write();
-+ if (itr->events & EPOLLOUT && evItr->second != NULL && evItr->first & EPOLLOUT)
-+ evItr->second->event_write();
- }
-
- m_waitingEvents = 0;
-@@ -173,9 +183,14 @@
- if (event_mask(event) != 0)
- throw internal_error("PollEPoll::close(...) called but the file descriptor is active");
-
-+ m_table[event->file_descriptor()] = Table::value_type();
-+
-+ /*
-+ Shouldn't be needed anymore.
- for (epoll_event *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr)
- if (itr->data.ptr == event)
- itr->data.ptr = NULL;
-+ */
- }
-
- void
-@@ -183,12 +198,14 @@
- // Kernel removes closed FDs automatically, so just clear the mask and remove it from pending calls.
- // Don't touch if the FD was re-used before we received the close notification.
- if (m_table[event->file_descriptor()].second == event)
-- set_event_mask(event, 0);
-+ m_table[event->file_descriptor()] = Table::value_type();
-
-+ /*
- for (epoll_event *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr) {
- if (itr->data.ptr == event)
- itr->data.ptr = NULL;
- }
-+ */
- }
-
- // Use custom defines for EPOLL* to make the below code compile with
-Index: libtorrent/src/torrent/poll_kqueue.cc
-===================================================================
---- libtorrent/src/torrent/poll_kqueue.cc (revision 1072)
-+++ libtorrent/src/torrent/poll_kqueue.cc (working copy)
-@@ -70,7 +70,7 @@
- PollKQueue::set_event_mask(Event* e, uint32_t m) {
- assert(e->file_descriptor() != -1);
-
-- m_table[e->file_descriptor()] = std::make_pair(m, e);
-+ m_table[e->file_descriptor()] = Table::value_type(m, e);
- }
-
- void
-@@ -87,7 +87,7 @@
-
- void
- PollKQueue::modify(Event* event, unsigned short op, short mask) {
-- // Flush the changed filters to the kernel if the buffer if full.
-+ // Flush the changed filters to the kernel if the buffer is full.
- if (m_changedEvents == m_table.size())
- flush_events();
-
-@@ -100,7 +100,8 @@
-
- struct kevent* itr = m_changes + (m_changedEvents++);
-
-- EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, event);
-+ assert(event == m_table[event->file_descriptor()].second);
-+ EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, NULL);
- }
-
- PollKQueue*
-@@ -196,8 +197,9 @@
- return nfds;
-
- if (FD_ISSET(0, readSet)) {
-+ m_events[m_waitingEvents].ident = 0;
- m_events[m_waitingEvents].filter = EVFILT_READ;
-- m_events[m_waitingEvents].udata = m_stdinEvent;
-+ m_events[m_waitingEvents].flags = 0;
- m_waitingEvents++;
- }
-
-@@ -208,19 +210,24 @@
- void
- PollKQueue::perform() {
- for (struct kevent *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr) {
-- if ((itr->flags & EV_ERROR) && itr->udata != NULL) {
-- if (event_mask((Event*)itr->udata) & flag_error)
-- ((Event*)itr->udata)->event_error();
-+ if (itr->ident < 0 || itr->ident >= m_table.size())
- continue;
-+
-+ Table::iterator evItr = m_table.begin() + itr->ident;
-+
-+ if ((itr->flags & EV_ERROR) && evItr->second != NULL) {
-+ if (evItr->first & flag_error)
-+ evItr->second->event_error();
-+ continue;
- }
-
- // Also check current mask.
-
-- if (itr->filter == EVFILT_READ && itr->udata != NULL && event_mask((Event*)itr->udata) & flag_read)
-- ((Event*)itr->udata)->event_read();
-+ if (itr->filter == EVFILT_READ && evItr->second != NULL && evItr->first & flag_read)
-+ evItr->second->event_read();
-
-- if (itr->filter == EVFILT_WRITE && itr->udata != NULL && event_mask((Event*)itr->udata) & flag_write)
-- ((Event*)itr->udata)->event_write();
-+ if (itr->filter == EVFILT_WRITE && evItr->second != NULL && evItr->first & flag_write)
-+ evItr->second->event_write();
- }
-
- m_waitingEvents = 0;
-@@ -249,11 +256,16 @@
- if (event_mask(event) != 0)
- throw internal_error("PollKQueue::close(...) called but the file descriptor is active");
-
-+ m_table[event->file_descriptor()] = Table::value_type();
-+
-+ /*
-+ Shouldn't be needed anymore.
- for (struct kevent *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr)
- if (itr->udata == event)
- itr->udata = NULL;
-
- m_changedEvents = std::remove_if(m_changes, m_changes + m_changedEvents, rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes;
-+ */
- }
-
- void
-@@ -269,14 +281,16 @@
- // and remove it from pending calls. Don't touch if the FD was
- // re-used before we received the close notification.
- if (m_table[event->file_descriptor()].second == event)
-- set_event_mask(event, 0);
-+ m_table[event->file_descriptor()] = Table::value_type();
-
-+ /*
- for (struct kevent *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr) {
- if (itr->udata == event)
- itr->udata = NULL;
- }
-
- m_changedEvents = std::remove_if(m_changes, m_changes + m_changedEvents, rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes;
-+ */
- }
-
- // Use custom defines for EPOLL* to make the below code compile with
diff --git a/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch b/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch
deleted file mode 100644
index a7cbe32ec62d..000000000000
--- a/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -Nurp libtorrent-0.12.4.old/src/torrent/poll_epoll.cc libtorrent-0.12.4/src/torrent/poll_epoll.cc
---- libtorrent-0.12.4.old/src/torrent/poll_epoll.cc 2008-10-28 06:49:47.000000000 -0500
-+++ libtorrent-0.12.4/src/torrent/poll_epoll.cc 2009-02-04 09:45:22.000000000 -0600
-@@ -37,6 +37,7 @@
- #include "config.h"
-
- #include <cerrno>
-+#include <cstdio>
- #include <cstring>
-
- #include <unistd.h>
-
-
-diff -Nurp libtorrent-0.12.4.old/src/protocol/extensions.cc libtorrent-0.12.4/src/protocol/extensions.cc
---- libtorrent-0.12.4.old/src/protocol/extensions.cc 2008-08-26 15:15:15.000000000 -0500
-+++ libtorrent-0.12.4/src/protocol/extensions.cc 2009-02-04 09:47:07.000000000 -0600
-@@ -36,6 +36,7 @@
-
- #include "config.h"
-
-+#include <cstdio>
- #include <limits>
- #include <sstream>
-
-diff -Nurp libtorrent-0.12.4.old/src/tracker/tracker_dht.cc libtorrent-0.12.4/src/tracker/tracker_dht.cc
---- libtorrent-0.12.4.old/src/tracker/tracker_dht.cc 2008-08-26 15:18:34.000000000 -0500
-+++ libtorrent-0.12.4/src/tracker/tracker_dht.cc 2009-02-04 09:48:49.000000000 -0600
-@@ -36,6 +36,8 @@
-
- #include "config.h"
-
-+#include <cstdio>
-+
- #include <sstream>
-
- #include "dht/dht_router.h"
-
-diff -Nurp libtorrent-0.12.4.old/src/tracker/tracker_udp.cc libtorrent-0.12.4/src/tracker/tracker_udp.cc
---- libtorrent-0.12.4.old/src/tracker/tracker_udp.cc 2008-05-07 07:19:13.000000000 -0500
-+++ libtorrent-0.12.4/src/tracker/tracker_udp.cc 2009-02-04 09:49:24.000000000 -0600
-@@ -36,6 +36,8 @@
-
- #include "config.h"
-
-+#include <cstdio>
-+
- #include <sigc++/adaptors/bind.h>
- #include <torrent/connection_manager.h>
-