[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [libktorrent/1.3] /: Fix bug causing authenticated peers not to get accepted
From: Joris Guisson <joris.guisson () gmail ! com>
Date: 2013-08-01 9:20:08
Message-ID: E1V4p3I-0005Og-O7 () scm ! kde ! org
[Download RAW message or body]
Git commit e423f2975e501a4bf2757722d028c151de3cb97a by Joris Guisson.
Committed on 01/08/2013 at 09:13.
Pushed by guisson into branch '1.3'.
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/e423f2975e501a4bf2757722d028c151de3cb97a
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)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic