From e8d478e2d8778713c04fb9707e63d4093bea3962 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Jul 13 2014 23:29:52 +0000 Subject: pull in upstream fix for authenticated peers not to get accepted --- diff --git a/0001-Fix-bug-causing-authenticated-peers-not-to-get-accep.patch b/0001-Fix-bug-causing-authenticated-peers-not-to-get-accep.patch new file mode 100644 index 0000000..f952594 --- /dev/null +++ b/0001-Fix-bug-causing-authenticated-peers-not-to-get-accep.patch @@ -0,0 +1,48 @@ +From e423f2975e501a4bf2757722d028c151de3cb97a Mon Sep 17 00:00:00 2001 +From: Joris Guisson +Date: Thu, 1 Aug 2013 11:13:58 +0200 +Subject: [PATCH] Fix bug causing authenticated peers not to get accepted + +--- + ChangeLog | 3 +++ + src/peer/peermanager.cpp | 12 +++++++----- + 2 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index b672cd7..891590f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,6 @@ ++Changes in 1.3.2: ++- Fix bug causing authenticated peers not to get accepted ++ + Changes in 1.3.1: + - Add workaround for broken handling of btrfs subvolumes by solid (306825) + - Fix crash when preallocating diskspace when a file is enabled during the download of a torrent (307178) +diff --git a/src/peer/peermanager.cpp b/src/peer/peermanager.cpp +index 33b8ce3..48eb868 100644 +--- a/src/peer/peermanager.cpp ++++ b/src/peer/peermanager.cpp +@@ -221,12 +221,14 @@ namespace bt + return; + + ConnectionLimit::Token::Ptr token = climit.acquire(d->tor.getInfoHash()); +- if(!token && d->killBadPeer()) +- { ++ if(!token) ++ { ++ d->killBadPeer(); + token = climit.acquire(d->tor.getInfoHash()); +- if(token) +- d->createPeer(sock, peer_id, support, false, token); +- } ++ } ++ ++ if(token) ++ d->createPeer(sock, peer_id, support, false, token); + } + + void PeerManager::peerAuthenticated(bt::Authenticate* auth, bt::PeerConnector::WPtr pcon, bool ok, bt::ConnectionLimit::Token::Ptr token) +-- +1.9.3 + diff --git a/libktorrent.spec b/libktorrent.spec index bd027fc..63d4f7d 100644 --- a/libktorrent.spec +++ b/libktorrent.spec @@ -2,12 +2,15 @@ Name: libktorrent Version: 1.3.1 -Release: 8%{?pre}%{?dist} +Release: 9%{?pre}%{?dist} Summary: Library providing torrent downloading code License: GPLv2+ URL: http://ktorrent.pwsp.net/ -Source0: http://ktorrent.pwsp.net/downloads/4.3.0%{?pre}/libktorrent-%{version}%{?pre}.tar.bz2 +Source0: http://ktorrent.pwsp.net/downloads/4.3.1%{?pre}/libktorrent-%{version}%{?pre}.tar.bz2 + +## upstream fixes +Patch101: 0001-Fix-bug-causing-authenticated-peers-not-to-get-accep.patch BuildRequires: boost-devel BuildRequires: gettext @@ -35,6 +38,8 @@ Requires: gmp-devel%{?_isa} %prep %setup -q -n %{name}-%{version}%{?pre} +%patch101 -p1 -b .0001 + %build mkdir -p %{_target_platform} @@ -65,6 +70,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Sun Jul 13 2014 Rex Dieter 1.3.1-9 +- pull in upstream fix for authenticated peers not to get accepted + * Sat Jun 07 2014 Fedora Release Engineering - 1.3.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild