diff options
Diffstat (limited to 'src/CheckIntegrityCommand.cc')
| -rw-r--r-- | src/CheckIntegrityCommand.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/CheckIntegrityCommand.cc b/src/CheckIntegrityCommand.cc index d65056d2..4c2858e1 100644 --- a/src/CheckIntegrityCommand.cc +++ b/src/CheckIntegrityCommand.cc @@ -33,7 +33,6 @@ */ /* copyright --> */ #include "CheckIntegrityCommand.h" -#include "CheckIntegrityMan.h" #include "CheckIntegrityEntry.h" #include "DownloadEngine.h" #include "RequestGroup.h" @@ -43,17 +42,14 @@ namespace aria2 { -CheckIntegrityCommand::CheckIntegrityCommand(int32_t cuid, RequestGroup* requestGroup, DownloadEngine* e, const CheckIntegrityEntryHandle& entry): +CheckIntegrityCommand::CheckIntegrityCommand +(int32_t cuid, RequestGroup* requestGroup, DownloadEngine* e, + const CheckIntegrityEntryHandle& entry): RealtimeCommand(cuid, requestGroup, e), _entry(entry) -{ - _e->_checkIntegrityMan->addCheckIntegrityEntry(_entry); -} +{} -CheckIntegrityCommand::~CheckIntegrityCommand() -{ - _e->_checkIntegrityMan->removeCheckIntegrityEntry(_entry); -} +CheckIntegrityCommand::~CheckIntegrityCommand() {} bool CheckIntegrityCommand::executeInternal() { @@ -62,6 +58,8 @@ bool CheckIntegrityCommand::executeInternal() } _entry->validateChunk(); if(_entry->finished()) { + _e->_checkIntegrityMan->dropPickedEntry(); + if(_requestGroup->downloadFinished()) { logger->notice(MSG_VERIFICATION_SUCCESSFUL, _requestGroup->getFilePath().c_str()); @@ -85,8 +83,10 @@ bool CheckIntegrityCommand::executeInternal() bool CheckIntegrityCommand::handleException(Exception& e) { + _e->_checkIntegrityMan->dropPickedEntry(); logger->error(MSG_FILE_VALIDATION_FAILURE, e, cuid); - logger->error(MSG_DOWNLOAD_NOT_COMPLETE, cuid, _requestGroup->getFilePath().c_str()); + logger->error(MSG_DOWNLOAD_NOT_COMPLETE, + cuid, _requestGroup->getFilePath().c_str()); return true; } |
