mirror of https://github.com/aria2/aria2
2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made (piece) hash check sequential for each RequestGroup because simultaneous hash check is slower than sequential execution. * src/CheckIntegrityCommand.cc * src/CheckIntegrityDispatcherCommand.cc * src/CheckIntegrityDispatcherCommand.h * src/CheckIntegrityMan.h * src/ConsoleStatCalc.cc * src/DownloadCommand.cc * src/DownloadEngine.cc * src/DownloadEngine.h * src/DownloadEngineFactory.cc * src/Makefile.am * src/Makefile.in * src/RequestGroup.cc * src/StatCalc.hpull/1/head
parent
5da58fe01d
commit
adf91f656b
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Made (piece) hash check sequential for each RequestGroup because
|
||||||
|
simultaneous hash check is slower than sequential execution.
|
||||||
|
* src/CheckIntegrityCommand.cc
|
||||||
|
* src/CheckIntegrityDispatcherCommand.cc
|
||||||
|
* src/CheckIntegrityDispatcherCommand.h
|
||||||
|
* src/CheckIntegrityMan.h
|
||||||
|
* src/ConsoleStatCalc.cc
|
||||||
|
* src/DownloadCommand.cc
|
||||||
|
* src/DownloadEngine.cc
|
||||||
|
* src/DownloadEngine.h
|
||||||
|
* src/DownloadEngineFactory.cc
|
||||||
|
* src/Makefile.am
|
||||||
|
* src/Makefile.in
|
||||||
|
* src/RequestGroup.cc
|
||||||
|
* src/StatCalc.h
|
||||||
|
|
||||||
2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Moved setStatusRealtime() from FileAllocationDispatcherCommand to
|
Moved setStatusRealtime() from FileAllocationDispatcherCommand to
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
*/
|
*/
|
||||||
/* copyright --> */
|
/* copyright --> */
|
||||||
#include "CheckIntegrityCommand.h"
|
#include "CheckIntegrityCommand.h"
|
||||||
#include "CheckIntegrityMan.h"
|
|
||||||
#include "CheckIntegrityEntry.h"
|
#include "CheckIntegrityEntry.h"
|
||||||
#include "DownloadEngine.h"
|
#include "DownloadEngine.h"
|
||||||
#include "RequestGroup.h"
|
#include "RequestGroup.h"
|
||||||
|
@ -43,17 +42,14 @@
|
||||||
|
|
||||||
namespace aria2 {
|
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),
|
RealtimeCommand(cuid, requestGroup, e),
|
||||||
_entry(entry)
|
_entry(entry)
|
||||||
{
|
{}
|
||||||
_e->_checkIntegrityMan->addCheckIntegrityEntry(_entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
CheckIntegrityCommand::~CheckIntegrityCommand()
|
CheckIntegrityCommand::~CheckIntegrityCommand() {}
|
||||||
{
|
|
||||||
_e->_checkIntegrityMan->removeCheckIntegrityEntry(_entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CheckIntegrityCommand::executeInternal()
|
bool CheckIntegrityCommand::executeInternal()
|
||||||
{
|
{
|
||||||
|
@ -62,6 +58,8 @@ bool CheckIntegrityCommand::executeInternal()
|
||||||
}
|
}
|
||||||
_entry->validateChunk();
|
_entry->validateChunk();
|
||||||
if(_entry->finished()) {
|
if(_entry->finished()) {
|
||||||
|
_e->_checkIntegrityMan->dropPickedEntry();
|
||||||
|
|
||||||
if(_requestGroup->downloadFinished()) {
|
if(_requestGroup->downloadFinished()) {
|
||||||
logger->notice(MSG_VERIFICATION_SUCCESSFUL,
|
logger->notice(MSG_VERIFICATION_SUCCESSFUL,
|
||||||
_requestGroup->getFilePath().c_str());
|
_requestGroup->getFilePath().c_str());
|
||||||
|
@ -85,8 +83,10 @@ bool CheckIntegrityCommand::executeInternal()
|
||||||
|
|
||||||
bool CheckIntegrityCommand::handleException(Exception& e)
|
bool CheckIntegrityCommand::handleException(Exception& e)
|
||||||
{
|
{
|
||||||
|
_e->_checkIntegrityMan->dropPickedEntry();
|
||||||
logger->error(MSG_FILE_VALIDATION_FAILURE, e, cuid);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
/* <!-- copyright */
|
||||||
|
/*
|
||||||
|
* aria2 - The high speed download utility
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009 Tatsuhiro Tsujikawa
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the copyright holders give
|
||||||
|
* permission to link the code of portions of this program with the
|
||||||
|
* OpenSSL library under certain conditions as described in each
|
||||||
|
* individual source file, and distribute linked combinations
|
||||||
|
* including the two.
|
||||||
|
* You must obey the GNU General Public License in all respects
|
||||||
|
* for all of the code used other than OpenSSL. If you modify
|
||||||
|
* file(s) with this exception, you may extend this exception to your
|
||||||
|
* version of the file(s), but you are not obligated to do so. If you
|
||||||
|
* do not wish to do so, delete this exception statement from your
|
||||||
|
* version. If you delete this exception statement from all source
|
||||||
|
* files in the program, then also delete it here.
|
||||||
|
*/
|
||||||
|
/* copyright --> */
|
||||||
|
#include "CheckIntegrityDispatcherCommand.h"
|
||||||
|
#include "CheckIntegrityEntry.h"
|
||||||
|
#include "CheckIntegrityCommand.h"
|
||||||
|
#include "message.h"
|
||||||
|
#include "Logger.h"
|
||||||
|
|
||||||
|
namespace aria2 {
|
||||||
|
|
||||||
|
CheckIntegrityDispatcherCommand::CheckIntegrityDispatcherCommand
|
||||||
|
(int32_t cuid,
|
||||||
|
const SharedHandle<CheckIntegrityMan>& fileAllocMan,
|
||||||
|
DownloadEngine* e):SequentialDispatcherCommand<CheckIntegrityEntry>
|
||||||
|
(cuid, fileAllocMan, e)
|
||||||
|
{
|
||||||
|
setStatusRealtime();
|
||||||
|
}
|
||||||
|
|
||||||
|
Command* CheckIntegrityDispatcherCommand::createCommand
|
||||||
|
(const SharedHandle<CheckIntegrityEntry>& entry)
|
||||||
|
{
|
||||||
|
int32_t newCUID = _e->newCUID();
|
||||||
|
logger->info("CUID#%d - Dispatching CheckIntegrityCommand CUID#%d.",
|
||||||
|
cuid, newCUID);
|
||||||
|
return new CheckIntegrityCommand
|
||||||
|
(newCUID, entry->getRequestGroup(), _e, entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace aria2
|
|
@ -0,0 +1,59 @@
|
||||||
|
/* <!-- copyright */
|
||||||
|
/*
|
||||||
|
* aria2 - The high speed download utility
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009 Tatsuhiro Tsujikawa
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the copyright holders give
|
||||||
|
* permission to link the code of portions of this program with the
|
||||||
|
* OpenSSL library under certain conditions as described in each
|
||||||
|
* individual source file, and distribute linked combinations
|
||||||
|
* including the two.
|
||||||
|
* You must obey the GNU General Public License in all respects
|
||||||
|
* for all of the code used other than OpenSSL. If you modify
|
||||||
|
* file(s) with this exception, you may extend this exception to your
|
||||||
|
* version of the file(s), but you are not obligated to do so. If you
|
||||||
|
* do not wish to do so, delete this exception statement from your
|
||||||
|
* version. If you delete this exception statement from all source
|
||||||
|
* files in the program, then also delete it here.
|
||||||
|
*/
|
||||||
|
/* copyright --> */
|
||||||
|
#ifndef _D_CHECK_INTEGRITY_DISPATCHER_COMMAND_H_
|
||||||
|
#define _D_CHECK_INTEGRITY_DISPATCHER_COMMAND_H_
|
||||||
|
|
||||||
|
#include "SequentialDispatcherCommand.h"
|
||||||
|
#include "CheckIntegrityMan.h"
|
||||||
|
|
||||||
|
namespace aria2 {
|
||||||
|
|
||||||
|
class CheckIntegrityEntry;
|
||||||
|
|
||||||
|
class CheckIntegrityDispatcherCommand :
|
||||||
|
public SequentialDispatcherCommand<CheckIntegrityEntry> {
|
||||||
|
public:
|
||||||
|
CheckIntegrityDispatcherCommand
|
||||||
|
(int32_t cuid,
|
||||||
|
const SharedHandle<CheckIntegrityMan>& checkMan,
|
||||||
|
DownloadEngine* e);
|
||||||
|
protected:
|
||||||
|
virtual Command* createCommand
|
||||||
|
(const SharedHandle<CheckIntegrityEntry>& entry);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aria2
|
||||||
|
|
||||||
|
#endif // _D_CHECK_INTEGRITY_DISPATCHER_COMMAND_H_
|
|
@ -36,31 +36,13 @@
|
||||||
#define _D_CHECK_INTEGRITY_MAN_H_
|
#define _D_CHECK_INTEGRITY_MAN_H_
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "SharedHandle.h"
|
#include "SequentialPicker.h"
|
||||||
#include <deque>
|
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
class CheckIntegrityEntry;
|
class CheckIntegrityEntry;
|
||||||
|
|
||||||
class CheckIntegrityMan {
|
typedef SequentialPicker<CheckIntegrityEntry> CheckIntegrityMan;
|
||||||
private:
|
|
||||||
std::deque<SharedHandle<CheckIntegrityEntry> > _checkIntegrityEntries;
|
|
||||||
public:
|
|
||||||
CheckIntegrityMan();
|
|
||||||
|
|
||||||
~CheckIntegrityMan();
|
|
||||||
|
|
||||||
void addCheckIntegrityEntry(const SharedHandle<CheckIntegrityEntry>& entry);
|
|
||||||
|
|
||||||
bool removeCheckIntegrityEntry(const SharedHandle<CheckIntegrityEntry>& entry);
|
|
||||||
|
|
||||||
SharedHandle<CheckIntegrityEntry> getFirstCheckIntegrityEntry() const;
|
|
||||||
|
|
||||||
size_t countCheckIntegrityEntry() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef SharedHandle<CheckIntegrityMan> CheckIntegrityManHandle;
|
|
||||||
|
|
||||||
} // namespace aria2
|
} // namespace aria2
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ void
|
||||||
ConsoleStatCalc::calculateStat
|
ConsoleStatCalc::calculateStat
|
||||||
(const RequestGroupManHandle& requestGroupMan,
|
(const RequestGroupManHandle& requestGroupMan,
|
||||||
const SharedHandle<FileAllocationMan>& fileAllocationMan,
|
const SharedHandle<FileAllocationMan>& fileAllocationMan,
|
||||||
const CheckIntegrityManHandle& checkIntegrityMan)
|
const SharedHandle<CheckIntegrityMan>& checkIntegrityMan)
|
||||||
{
|
{
|
||||||
if(!_cp.elapsed(1)) {
|
if(!_cp.elapsed(1)) {
|
||||||
return;
|
return;
|
||||||
|
@ -239,7 +239,7 @@ ConsoleStatCalc::calculateStat
|
||||||
}
|
}
|
||||||
#ifdef ENABLE_MESSAGE_DIGEST
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
{
|
{
|
||||||
CheckIntegrityEntryHandle entry = checkIntegrityMan->getFirstCheckIntegrityEntry();
|
CheckIntegrityEntryHandle entry = checkIntegrityMan->getPickedEntry();
|
||||||
if(!entry.isNull()) {
|
if(!entry.isNull()) {
|
||||||
o << " "
|
o << " "
|
||||||
<< "[Checksum:"
|
<< "[Checksum:"
|
||||||
|
@ -253,10 +253,10 @@ ConsoleStatCalc::calculateStat
|
||||||
<< 100*entry->getCurrentLength()/entry->getTotalLength()
|
<< 100*entry->getCurrentLength()/entry->getTotalLength()
|
||||||
<< "%)"
|
<< "%)"
|
||||||
<< "]";
|
<< "]";
|
||||||
if(checkIntegrityMan->countCheckIntegrityEntry() > 1) {
|
if(checkIntegrityMan->hasNext()) {
|
||||||
o << "("
|
o << "("
|
||||||
<< checkIntegrityMan->countCheckIntegrityEntry()-1
|
<< checkIntegrityMan->countEntryInQueue()
|
||||||
<< "more...)";
|
<< "waiting...)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,9 +254,8 @@ bool DownloadCommand::prepareForNextSegment() {
|
||||||
CheckIntegrityEntryHandle entry(new ChecksumCheckIntegrityEntry(_requestGroup));
|
CheckIntegrityEntryHandle entry(new ChecksumCheckIntegrityEntry(_requestGroup));
|
||||||
if(entry->isValidationReady()) {
|
if(entry->isValidationReady()) {
|
||||||
entry->initValidator();
|
entry->initValidator();
|
||||||
CheckIntegrityCommand* command =
|
// TODO do we need cuttrailinggarbage here?
|
||||||
new CheckIntegrityCommand(e->newCUID(), _requestGroup, e, entry);
|
e->_checkIntegrityMan->pushEntry(entry);
|
||||||
e->commands.push_back(command);
|
|
||||||
}
|
}
|
||||||
e->setNoWait(true);
|
e->setNoWait(true);
|
||||||
e->setRefreshInterval(0);
|
e->setRefreshInterval(0);
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
#include "StatCalc.h"
|
#include "StatCalc.h"
|
||||||
#include "RequestGroup.h"
|
#include "RequestGroup.h"
|
||||||
#include "RequestGroupMan.h"
|
#include "RequestGroupMan.h"
|
||||||
#include "CheckIntegrityMan.h"
|
|
||||||
#include "DownloadResult.h"
|
#include "DownloadResult.h"
|
||||||
#include "StatCalc.h"
|
#include "StatCalc.h"
|
||||||
#include "LogFactory.h"
|
#include "LogFactory.h"
|
||||||
|
@ -65,6 +64,7 @@
|
||||||
#include "EventPoll.h"
|
#include "EventPoll.h"
|
||||||
#include "Command.h"
|
#include "Command.h"
|
||||||
#include "FileAllocationEntry.h"
|
#include "FileAllocationEntry.h"
|
||||||
|
#include "CheckIntegrityEntry.h"
|
||||||
|
|
||||||
#include "BtRegistry.h"
|
#include "BtRegistry.h"
|
||||||
#include "BtContext.h"
|
#include "BtContext.h"
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#endif // ENABLE_ASYNC_DNS
|
#endif // ENABLE_ASYNC_DNS
|
||||||
#include "CUIDCounter.h"
|
#include "CUIDCounter.h"
|
||||||
#include "FileAllocationMan.h"
|
#include "FileAllocationMan.h"
|
||||||
|
#include "CheckIntegrityMan.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -57,7 +58,6 @@ class Logger;
|
||||||
class Option;
|
class Option;
|
||||||
class RequestGroupMan;
|
class RequestGroupMan;
|
||||||
class StatCalc;
|
class StatCalc;
|
||||||
class CheckIntegrityMan;
|
|
||||||
class SocketCore;
|
class SocketCore;
|
||||||
class CookieStorage;
|
class CookieStorage;
|
||||||
class BtRegistry;
|
class BtRegistry;
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
#include "FileAllocationMan.h"
|
#include "FileAllocationMan.h"
|
||||||
#ifdef ENABLE_MESSAGE_DIGEST
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
# include "CheckIntegrityMan.h"
|
# include "CheckIntegrityMan.h"
|
||||||
|
# include "CheckIntegrityEntry.h"
|
||||||
|
# include "CheckIntegrityDispatcherCommand.h"
|
||||||
#endif // ENABLE_MESSAGE_DIGEST
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
#include "prefs.h"
|
#include "prefs.h"
|
||||||
#include "FillRequestGroupCommand.h"
|
#include "FillRequestGroupCommand.h"
|
||||||
|
@ -118,6 +120,11 @@ DownloadEngineFactory::newDownloadEngine(Option* op,
|
||||||
e->addRoutineCommand(new FillRequestGroupCommand(e->newCUID(), e.get(), 1));
|
e->addRoutineCommand(new FillRequestGroupCommand(e->newCUID(), e.get(), 1));
|
||||||
e->addRoutineCommand(new FileAllocationDispatcherCommand
|
e->addRoutineCommand(new FileAllocationDispatcherCommand
|
||||||
(e->newCUID(), e->_fileAllocationMan, e.get()));
|
(e->newCUID(), e->_fileAllocationMan, e.get()));
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
e->addRoutineCommand(new CheckIntegrityDispatcherCommand
|
||||||
|
(e->newCUID(), e->_checkIntegrityMan, e.get()));
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
if(op->getAsInt(PREF_AUTO_SAVE_INTERVAL) > 0) {
|
if(op->getAsInt(PREF_AUTO_SAVE_INTERVAL) > 0) {
|
||||||
e->addRoutineCommand
|
e->addRoutineCommand
|
||||||
(new AutoSaveCommand(e->newCUID(), e.get(),
|
(new AutoSaveCommand(e->newCUID(), e.get(),
|
||||||
|
|
|
@ -135,7 +135,7 @@ SRCS = Socket.h\
|
||||||
MemoryBufferPreDownloadHandler.cc MemoryBufferPreDownloadHandler.h\
|
MemoryBufferPreDownloadHandler.cc MemoryBufferPreDownloadHandler.h\
|
||||||
HaveEraseCommand.cc HaveEraseCommand.h\
|
HaveEraseCommand.cc HaveEraseCommand.h\
|
||||||
Piece.cc Piece.h\
|
Piece.cc Piece.h\
|
||||||
CheckIntegrityMan.cc CheckIntegrityMan.h\
|
CheckIntegrityMan.h\
|
||||||
CheckIntegrityEntry.cc CheckIntegrityEntry.h\
|
CheckIntegrityEntry.cc CheckIntegrityEntry.h\
|
||||||
PieceHashCheckIntegrityEntry.cc PieceHashCheckIntegrityEntry.h\
|
PieceHashCheckIntegrityEntry.cc PieceHashCheckIntegrityEntry.h\
|
||||||
StreamCheckIntegrityEntry.cc StreamCheckIntegrityEntry.h\
|
StreamCheckIntegrityEntry.cc StreamCheckIntegrityEntry.h\
|
||||||
|
@ -233,6 +233,7 @@ endif # ENABLE_ASYNC_DNS
|
||||||
if ENABLE_MESSAGE_DIGEST
|
if ENABLE_MESSAGE_DIGEST
|
||||||
SRCS += IteratableChunkChecksumValidator.cc IteratableChunkChecksumValidator.h\
|
SRCS += IteratableChunkChecksumValidator.cc IteratableChunkChecksumValidator.h\
|
||||||
IteratableChecksumValidator.cc IteratableChecksumValidator.h\
|
IteratableChecksumValidator.cc IteratableChecksumValidator.h\
|
||||||
|
CheckIntegrityDispatcherCommand.cc CheckIntegrityDispatcherCommand.h\
|
||||||
CheckIntegrityCommand.cc CheckIntegrityCommand.h\
|
CheckIntegrityCommand.cc CheckIntegrityCommand.h\
|
||||||
ChecksumCheckIntegrityEntry.cc ChecksumCheckIntegrityEntry.h\
|
ChecksumCheckIntegrityEntry.cc ChecksumCheckIntegrityEntry.h\
|
||||||
messageDigest.cc messageDigest.h\
|
messageDigest.cc messageDigest.h\
|
||||||
|
|
|
@ -44,6 +44,7 @@ bin_PROGRAMS = aria2c$(EXEEXT)
|
||||||
@ENABLE_ASYNC_DNS_TRUE@am__append_7 = AsyncNameResolver.cc AsyncNameResolver.h
|
@ENABLE_ASYNC_DNS_TRUE@am__append_7 = AsyncNameResolver.cc AsyncNameResolver.h
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@am__append_8 = IteratableChunkChecksumValidator.cc IteratableChunkChecksumValidator.h\
|
@ENABLE_MESSAGE_DIGEST_TRUE@am__append_8 = IteratableChunkChecksumValidator.cc IteratableChunkChecksumValidator.h\
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@ IteratableChecksumValidator.cc IteratableChecksumValidator.h\
|
@ENABLE_MESSAGE_DIGEST_TRUE@ IteratableChecksumValidator.cc IteratableChecksumValidator.h\
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityDispatcherCommand.cc CheckIntegrityDispatcherCommand.h\
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityCommand.cc CheckIntegrityCommand.h\
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityCommand.cc CheckIntegrityCommand.h\
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@ ChecksumCheckIntegrityEntry.cc ChecksumCheckIntegrityEntry.h\
|
@ENABLE_MESSAGE_DIGEST_TRUE@ ChecksumCheckIntegrityEntry.cc ChecksumCheckIntegrityEntry.h\
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@ messageDigest.cc messageDigest.h\
|
@ENABLE_MESSAGE_DIGEST_TRUE@ messageDigest.cc messageDigest.h\
|
||||||
|
@ -375,17 +376,16 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \
|
||||||
DownloadHandlerConstants.h DownloadHandlerFactory.cc \
|
DownloadHandlerConstants.h DownloadHandlerFactory.cc \
|
||||||
DownloadHandlerFactory.h MemoryBufferPreDownloadHandler.cc \
|
DownloadHandlerFactory.h MemoryBufferPreDownloadHandler.cc \
|
||||||
MemoryBufferPreDownloadHandler.h HaveEraseCommand.cc \
|
MemoryBufferPreDownloadHandler.h HaveEraseCommand.cc \
|
||||||
HaveEraseCommand.h Piece.cc Piece.h CheckIntegrityMan.cc \
|
HaveEraseCommand.h Piece.cc Piece.h CheckIntegrityMan.h \
|
||||||
CheckIntegrityMan.h CheckIntegrityEntry.cc \
|
CheckIntegrityEntry.cc CheckIntegrityEntry.h \
|
||||||
CheckIntegrityEntry.h PieceHashCheckIntegrityEntry.cc \
|
PieceHashCheckIntegrityEntry.cc PieceHashCheckIntegrityEntry.h \
|
||||||
PieceHashCheckIntegrityEntry.h StreamCheckIntegrityEntry.cc \
|
StreamCheckIntegrityEntry.cc StreamCheckIntegrityEntry.h \
|
||||||
StreamCheckIntegrityEntry.h IteratableValidator.h \
|
IteratableValidator.h DiskAdaptor.cc DiskAdaptor.h \
|
||||||
DiskAdaptor.cc DiskAdaptor.h AbstractSingleDiskAdaptor.cc \
|
AbstractSingleDiskAdaptor.cc AbstractSingleDiskAdaptor.h \
|
||||||
AbstractSingleDiskAdaptor.h CopyDiskAdaptor.cc \
|
CopyDiskAdaptor.cc CopyDiskAdaptor.h DirectDiskAdaptor.cc \
|
||||||
CopyDiskAdaptor.h DirectDiskAdaptor.cc DirectDiskAdaptor.h \
|
DirectDiskAdaptor.h MultiDiskAdaptor.cc MultiDiskAdaptor.h \
|
||||||
MultiDiskAdaptor.cc MultiDiskAdaptor.h Peer.cc \
|
Peer.cc PeerSessionResource.cc PeerSessionResource.h \
|
||||||
PeerSessionResource.cc PeerSessionResource.h BtRegistry.cc \
|
BtRegistry.cc BtRegistry.h MultiFileAllocationIterator.cc \
|
||||||
BtRegistry.h MultiFileAllocationIterator.cc \
|
|
||||||
MultiFileAllocationIterator.h PeerConnection.cc \
|
MultiFileAllocationIterator.h PeerConnection.cc \
|
||||||
PeerConnection.h ByteArrayDiskWriter.cc ByteArrayDiskWriter.h \
|
PeerConnection.h ByteArrayDiskWriter.cc ByteArrayDiskWriter.h \
|
||||||
ByteArrayDiskWriterFactory.cc ByteArrayDiskWriterFactory.h \
|
ByteArrayDiskWriterFactory.cc ByteArrayDiskWriterFactory.h \
|
||||||
|
@ -422,12 +422,14 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \
|
||||||
AsyncNameResolver.h IteratableChunkChecksumValidator.cc \
|
AsyncNameResolver.h IteratableChunkChecksumValidator.cc \
|
||||||
IteratableChunkChecksumValidator.h \
|
IteratableChunkChecksumValidator.h \
|
||||||
IteratableChecksumValidator.cc IteratableChecksumValidator.h \
|
IteratableChecksumValidator.cc IteratableChecksumValidator.h \
|
||||||
CheckIntegrityCommand.cc CheckIntegrityCommand.h \
|
CheckIntegrityDispatcherCommand.cc \
|
||||||
ChecksumCheckIntegrityEntry.cc ChecksumCheckIntegrityEntry.h \
|
CheckIntegrityDispatcherCommand.h CheckIntegrityCommand.cc \
|
||||||
messageDigest.cc messageDigest.h MessageDigestHelper.cc \
|
CheckIntegrityCommand.h ChecksumCheckIntegrityEntry.cc \
|
||||||
MessageDigestHelper.h Checksum.h ChunkChecksum.h \
|
ChecksumCheckIntegrityEntry.h messageDigest.cc messageDigest.h \
|
||||||
PeerMessageUtil.cc PeerMessageUtil.h PeerAbstractCommand.cc \
|
MessageDigestHelper.cc MessageDigestHelper.h Checksum.h \
|
||||||
PeerAbstractCommand.h PeerInitiateConnectionCommand.cc \
|
ChunkChecksum.h PeerMessageUtil.cc PeerMessageUtil.h \
|
||||||
|
PeerAbstractCommand.cc PeerAbstractCommand.h \
|
||||||
|
PeerInitiateConnectionCommand.cc \
|
||||||
PeerInitiateConnectionCommand.h PeerInteractionCommand.cc \
|
PeerInitiateConnectionCommand.h PeerInteractionCommand.cc \
|
||||||
PeerInteractionCommand.h Peer.h PeerListenCommand.cc \
|
PeerInteractionCommand.h Peer.h PeerListenCommand.cc \
|
||||||
PeerListenCommand.h RequestSlot.cc RequestSlot.h \
|
PeerListenCommand.h RequestSlot.cc RequestSlot.h \
|
||||||
|
@ -581,6 +583,7 @@ am__objects_2 =
|
||||||
@ENABLE_ASYNC_DNS_TRUE@am__objects_7 = AsyncNameResolver.$(OBJEXT)
|
@ENABLE_ASYNC_DNS_TRUE@am__objects_7 = AsyncNameResolver.$(OBJEXT)
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@am__objects_8 = IteratableChunkChecksumValidator.$(OBJEXT) \
|
@ENABLE_MESSAGE_DIGEST_TRUE@am__objects_8 = IteratableChunkChecksumValidator.$(OBJEXT) \
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@ IteratableChecksumValidator.$(OBJEXT) \
|
@ENABLE_MESSAGE_DIGEST_TRUE@ IteratableChecksumValidator.$(OBJEXT) \
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityDispatcherCommand.$(OBJEXT) \
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityCommand.$(OBJEXT) \
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityCommand.$(OBJEXT) \
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@ ChecksumCheckIntegrityEntry.$(OBJEXT) \
|
@ENABLE_MESSAGE_DIGEST_TRUE@ ChecksumCheckIntegrityEntry.$(OBJEXT) \
|
||||||
@ENABLE_MESSAGE_DIGEST_TRUE@ messageDigest.$(OBJEXT) \
|
@ENABLE_MESSAGE_DIGEST_TRUE@ messageDigest.$(OBJEXT) \
|
||||||
|
@ -785,7 +788,7 @@ am__objects_22 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \
|
||||||
DownloadHandlerFactory.$(OBJEXT) \
|
DownloadHandlerFactory.$(OBJEXT) \
|
||||||
MemoryBufferPreDownloadHandler.$(OBJEXT) \
|
MemoryBufferPreDownloadHandler.$(OBJEXT) \
|
||||||
HaveEraseCommand.$(OBJEXT) Piece.$(OBJEXT) \
|
HaveEraseCommand.$(OBJEXT) Piece.$(OBJEXT) \
|
||||||
CheckIntegrityMan.$(OBJEXT) CheckIntegrityEntry.$(OBJEXT) \
|
CheckIntegrityEntry.$(OBJEXT) \
|
||||||
PieceHashCheckIntegrityEntry.$(OBJEXT) \
|
PieceHashCheckIntegrityEntry.$(OBJEXT) \
|
||||||
StreamCheckIntegrityEntry.$(OBJEXT) DiskAdaptor.$(OBJEXT) \
|
StreamCheckIntegrityEntry.$(OBJEXT) DiskAdaptor.$(OBJEXT) \
|
||||||
AbstractSingleDiskAdaptor.$(OBJEXT) CopyDiskAdaptor.$(OBJEXT) \
|
AbstractSingleDiskAdaptor.$(OBJEXT) CopyDiskAdaptor.$(OBJEXT) \
|
||||||
|
@ -1102,17 +1105,16 @@ SRCS = Socket.h SocketCore.cc SocketCore.h BinaryStream.h Command.cc \
|
||||||
DownloadHandlerConstants.h DownloadHandlerFactory.cc \
|
DownloadHandlerConstants.h DownloadHandlerFactory.cc \
|
||||||
DownloadHandlerFactory.h MemoryBufferPreDownloadHandler.cc \
|
DownloadHandlerFactory.h MemoryBufferPreDownloadHandler.cc \
|
||||||
MemoryBufferPreDownloadHandler.h HaveEraseCommand.cc \
|
MemoryBufferPreDownloadHandler.h HaveEraseCommand.cc \
|
||||||
HaveEraseCommand.h Piece.cc Piece.h CheckIntegrityMan.cc \
|
HaveEraseCommand.h Piece.cc Piece.h CheckIntegrityMan.h \
|
||||||
CheckIntegrityMan.h CheckIntegrityEntry.cc \
|
CheckIntegrityEntry.cc CheckIntegrityEntry.h \
|
||||||
CheckIntegrityEntry.h PieceHashCheckIntegrityEntry.cc \
|
PieceHashCheckIntegrityEntry.cc PieceHashCheckIntegrityEntry.h \
|
||||||
PieceHashCheckIntegrityEntry.h StreamCheckIntegrityEntry.cc \
|
StreamCheckIntegrityEntry.cc StreamCheckIntegrityEntry.h \
|
||||||
StreamCheckIntegrityEntry.h IteratableValidator.h \
|
IteratableValidator.h DiskAdaptor.cc DiskAdaptor.h \
|
||||||
DiskAdaptor.cc DiskAdaptor.h AbstractSingleDiskAdaptor.cc \
|
AbstractSingleDiskAdaptor.cc AbstractSingleDiskAdaptor.h \
|
||||||
AbstractSingleDiskAdaptor.h CopyDiskAdaptor.cc \
|
CopyDiskAdaptor.cc CopyDiskAdaptor.h DirectDiskAdaptor.cc \
|
||||||
CopyDiskAdaptor.h DirectDiskAdaptor.cc DirectDiskAdaptor.h \
|
DirectDiskAdaptor.h MultiDiskAdaptor.cc MultiDiskAdaptor.h \
|
||||||
MultiDiskAdaptor.cc MultiDiskAdaptor.h Peer.cc \
|
Peer.cc PeerSessionResource.cc PeerSessionResource.h \
|
||||||
PeerSessionResource.cc PeerSessionResource.h BtRegistry.cc \
|
BtRegistry.cc BtRegistry.h MultiFileAllocationIterator.cc \
|
||||||
BtRegistry.h MultiFileAllocationIterator.cc \
|
|
||||||
MultiFileAllocationIterator.h PeerConnection.cc \
|
MultiFileAllocationIterator.h PeerConnection.cc \
|
||||||
PeerConnection.h ByteArrayDiskWriter.cc ByteArrayDiskWriter.h \
|
PeerConnection.h ByteArrayDiskWriter.cc ByteArrayDiskWriter.h \
|
||||||
ByteArrayDiskWriterFactory.cc ByteArrayDiskWriterFactory.h \
|
ByteArrayDiskWriterFactory.cc ByteArrayDiskWriterFactory.h \
|
||||||
|
@ -1287,8 +1289,8 @@ distclean-compile:
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ByteArrayDiskWriter.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ByteArrayDiskWriter.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ByteArrayDiskWriterFactory.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ByteArrayDiskWriterFactory.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CheckIntegrityCommand.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CheckIntegrityCommand.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CheckIntegrityDispatcherCommand.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CheckIntegrityEntry.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CheckIntegrityEntry.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CheckIntegrityMan.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChecksumCheckIntegrityEntry.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChecksumCheckIntegrityEntry.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChunkedDecoder.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChunkedDecoder.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command.Po@am__quote@
|
||||||
|
|
|
@ -348,9 +348,7 @@ void RequestGroup::processCheckIntegrityEntry(std::deque<Command*>& commands,
|
||||||
entry->isValidationReady()) {
|
entry->isValidationReady()) {
|
||||||
entry->initValidator();
|
entry->initValidator();
|
||||||
entry->cutTrailingGarbage();
|
entry->cutTrailingGarbage();
|
||||||
CheckIntegrityCommand* command =
|
e->_checkIntegrityMan->pushEntry(entry);
|
||||||
new CheckIntegrityCommand(e->newCUID(), this, e, entry);
|
|
||||||
commands.push_back(command);
|
|
||||||
} else
|
} else
|
||||||
#endif // ENABLE_MESSAGE_DIGEST
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,11 +38,11 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "SharedHandle.h"
|
#include "SharedHandle.h"
|
||||||
#include "FileAllocationMan.h"
|
#include "FileAllocationMan.h"
|
||||||
|
#include "CheckIntegrityMan.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
class RequestGroupMan;
|
class RequestGroupMan;
|
||||||
class CheckIntegrityMan;
|
|
||||||
|
|
||||||
class StatCalc {
|
class StatCalc {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue