[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [libktorrent] /: Fix bug causing authenticated peers not to get accepted
From: Joris Guisson <joris.guisson () gmail ! com>
Date: 2013-08-01 9:20:11
Message-ID: E1V4p3L-0005PP-EH () scm ! kde ! org
[Download RAW message or body]
Git commit 388b984e9f33ea179c8d132f5c22183c0957242b by Joris Guisson.
Committed on 01/08/2013 at 09:13.
Pushed by guisson into branch 'master'.
Fix bug causing authenticated peers not to get accepted
M +3 -0 ChangeLog
M +7 -5 src/peer/peermanager.cpp
http://commits.kde.org/libktorrent/388b984e9f33ea179c8d132f5c22183c0957242b
diff --git a/ChangeLog b/ChangeLog
index 02121a1..9a249a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@ Changes in 1.4:
- Make sure we do not connect to the custom IP or the routers IP (316446)
- Fix url query not getting passed to webseed download requests (318325)
+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)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic