diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-08 14:11:36 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-08 14:11:36 +0000 |
| commit | 7cd9b21937c42606354610c7ae85a0857b474cf5 (patch) | |
| tree | 21edec9e14d7bde8cfa705840a6e9756b732e1e5 /src/DownloadCommand.cc | |
| parent | 2dc4bf01ad3b9be3de22696128e8007cf81a5345 (diff) | |
2010-06-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made public member variables of DownloadEngine private. Added
accessor funcs.
Diffstat (limited to 'src/DownloadCommand.cc')
| -rw-r--r-- | src/DownloadCommand.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/DownloadCommand.cc b/src/DownloadCommand.cc index 256b7c94..1a0c4740 100644 --- a/src/DownloadCommand.cc +++ b/src/DownloadCommand.cc @@ -59,6 +59,8 @@ #include "Decoder.h" #include "RequestGroupMan.h" #include "wallclock.h" +#include "ServerStatMan.h" +#include "FileAllocationEntry.h" #ifdef ENABLE_MESSAGE_DIGEST # include "MessageDigestHelper.h" #endif // ENABLE_MESSAGE_DIGEST @@ -106,9 +108,9 @@ DownloadCommand::~DownloadCommand() { } bool DownloadCommand::executeInternal() { - if(e->_requestGroupMan->doesOverallDownloadSpeedExceed() || + if(e->getRequestGroupMan()->doesOverallDownloadSpeedExceed() || _requestGroup->doesDownloadSpeedExceed()) { - e->commands.push_back(this); + e->addCommand(this); disableReadCheckSocket(); return false; } @@ -248,7 +250,7 @@ bool DownloadCommand::executeInternal() { } else { checkLowestDownloadSpeed(); setWriteCheckSocketIf(socket, socket->wantWrite()); - e->commands.push_back(this); + e->addCommand(this); return false; } } @@ -292,7 +294,7 @@ bool DownloadCommand::prepareForNextSegment() { if(entry->isValidationReady()) { entry->initValidator(); // TODO do we need cuttrailinggarbage here? - e->_checkIntegrityMan->pushEntry(entry); + e->getCheckIntegrityMan()->pushEntry(entry); } } // Following 2lines are needed for DownloadEngine to detect @@ -316,7 +318,7 @@ bool DownloadCommand::prepareForNextSegment() { if(nextSegment.isNull()) { return prepareForRetry(0); } else { - e->commands.push_back(this); + e->addCommand(this); return false; } } else { |
