summaryrefslogtreecommitdiff
path: root/src/ActivePeerConnectionCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-05-08 16:41:21 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-05-08 16:41:21 +0000
commit4cb5468662394ddf588d2c5c5787d24c799524ab (patch)
tree49f7c078aacfc44e3eb65f333fb4f5d7c932b27d /src/ActivePeerConnectionCommand.cc
parent08856691b3fa306483c199a1e88ab15bcf0eea85 (diff)
2009-05-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Now RequestGroup has its own copy of Option object. This will help to give custom option for each RequestGroup. addTorrentFile command now takes options. * src/AbstractCommand.cc * src/AbstractCommand.h * src/AbstractProxyRequestCommand.cc * src/ActivePeerConnectionCommand.cc * src/ActivePeerConnectionCommand.h * src/AdaptiveURISelector.cc * src/BtCheckIntegrityEntry.cc * src/BtDependency.cc * src/BtDependency.h * src/BtFileAllocationEntry.cc * src/BtPostDownloadHandler.cc * src/CheckIntegrityEntry.cc * src/DownloadCommand.cc * src/FtpDownloadCommand.cc * src/FtpFinishDownloadCommand.cc * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc * src/HttpInitiateConnectionCommand.cc * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc * src/InitiateConnectionCommand.cc * src/InitiateConnectionCommandFactory.cc * src/InitiatorMSEHandshakeCommand.cc * src/InitiatorMSEHandshakeCommand.h * src/Metalink2RequestGroup.cc * src/Metalink2RequestGroup.h * src/MetalinkPostDownloadHandler.cc * src/MultiUrlRequestInfo.cc * src/MultiUrlRequestInfo.h * src/PeerAbstractCommand.cc * src/PeerInteractionCommand.cc * src/PeerInteractionCommand.h * src/PeerReceiveHandshakeCommand.cc * src/PeerReceiveHandshakeCommand.h * src/RequestGroup.cc * src/RequestGroup.h * src/TrackerWatcherCommand.cc * src/TrackerWatcherCommand.h * src/XmlRpcMethod.cc * src/XmlRpcMethod.h * src/XmlRpcMethodImpl.cc * src/download_helper.cc * src/download_helper.h * src/main.cc * test/BtDependencyTest.cc * test/BtPostDownloadHandlerTest.cc * test/DefaultBtMessageDispatcherTest.cc * test/DownloadHandlerFactoryTest.cc * test/DownloadHelperTest.cc * test/Metalink2RequestGroupTest.cc * test/MetalinkPostDownloadHandlerTest.cc * test/RequestGroupManTest.cc * test/RequestGroupTest.cc
Diffstat (limited to 'src/ActivePeerConnectionCommand.cc')
-rw-r--r--src/ActivePeerConnectionCommand.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ActivePeerConnectionCommand.cc b/src/ActivePeerConnectionCommand.cc
index 828488e0..7c76ab4a 100644
--- a/src/ActivePeerConnectionCommand.cc
+++ b/src/ActivePeerConnectionCommand.cc
@@ -63,7 +63,6 @@ ActivePeerConnectionCommand::ActivePeerConnectionCommand
_btContext(btContext),
interval(interval),
e(e),
- _thresholdSpeed(e->option->getAsInt(PREF_BT_REQUEST_PEER_SPEED_LIMIT)),
_numNewConnection(5)
{
_requestGroup->increaseNumCommand();
@@ -84,9 +83,10 @@ bool ActivePeerConnectionCommand::execute() {
const unsigned int maxDownloadLimit =
_requestGroup->getMaxDownloadSpeedLimit();
const unsigned int maxUploadLimit = _requestGroup->getMaxUploadSpeedLimit();
- unsigned int thresholdSpeed = _thresholdSpeed;
+ unsigned int thresholdSpeed =
+ _requestGroup->getOption()->getAsInt(PREF_BT_REQUEST_PEER_SPEED_LIMIT);
if(maxDownloadLimit > 0) {
- thresholdSpeed = std::min(maxDownloadLimit, _thresholdSpeed);
+ thresholdSpeed = std::min(maxDownloadLimit, thresholdSpeed);
}
if(// for seeder state
(_pieceStorage->downloadFinished() && _btRuntime->lessThanMaxPeers() &&