mirror of https://github.com/aria2/aria2
Fixed compile error when message digest is not available.
parent
e5e46914d1
commit
800bc3a6c3
|
@ -118,6 +118,8 @@ ENABLE_ASYNC_DNS_FALSE = @ENABLE_ASYNC_DNS_FALSE@
|
||||||
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
||||||
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
||||||
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE = @ENABLE_MESSAGE_DIGEST_FALSE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE = @ENABLE_MESSAGE_DIGEST_TRUE@
|
||||||
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
||||||
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
|
3
TODO
3
TODO
|
@ -25,3 +25,6 @@
|
||||||
* consider life cycle of requestGroup and segmentMan
|
* consider life cycle of requestGroup and segmentMan
|
||||||
* exit status: all downloads have been successful-> EXIT_SUCCESS,
|
* exit status: all downloads have been successful-> EXIT_SUCCESS,
|
||||||
some of downloads have been failed -> EXIT_FAILURE
|
some of downloads have been failed -> EXIT_FAILURE
|
||||||
|
|
||||||
|
|
||||||
|
* Replace MetalinkChunkChecksum with ChunkChecksum
|
|
@ -716,6 +716,8 @@ LIBCARES_LIBS
|
||||||
LIBCARES_CPPFLAGS
|
LIBCARES_CPPFLAGS
|
||||||
LIBARES_LIBS
|
LIBARES_LIBS
|
||||||
LIBARES_CPPFLAGS
|
LIBARES_CPPFLAGS
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE
|
||||||
ENABLE_BITTORRENT_TRUE
|
ENABLE_BITTORRENT_TRUE
|
||||||
ENABLE_BITTORRENT_FALSE
|
ENABLE_BITTORRENT_FALSE
|
||||||
ENABLE_METALINK_TRUE
|
ENABLE_METALINK_TRUE
|
||||||
|
@ -5439,7 +5441,28 @@ cat >>confdefs.h <<\_ACEOF
|
||||||
#define ENABLE_MESSAGE_DIGEST 1
|
#define ENABLE_MESSAGE_DIGEST 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if true; then
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE=
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE='#'
|
||||||
|
else
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE='#'
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
enable_message_digest=yes
|
enable_message_digest=yes
|
||||||
|
else
|
||||||
|
|
||||||
|
|
||||||
|
if false; then
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE=
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE='#'
|
||||||
|
else
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE='#'
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$enable_bittorrent" = "xyes" && test "x$enable_message_digest" = "xyes"; then
|
if test "x$enable_bittorrent" = "xyes" && test "x$enable_message_digest" = "xyes"; then
|
||||||
|
@ -12599,6 +12622,20 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." >&2;}
|
Usually this means the macro was only invoked conditionally." >&2;}
|
||||||
{ (exit 1); exit 1; }; }
|
{ (exit 1); exit 1; }; }
|
||||||
fi
|
fi
|
||||||
|
if test -z "${ENABLE_MESSAGE_DIGEST_TRUE}" && test -z "${ENABLE_MESSAGE_DIGEST_FALSE}"; then
|
||||||
|
{ { echo "$as_me:$LINENO: error: conditional \"ENABLE_MESSAGE_DIGEST\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." >&5
|
||||||
|
echo "$as_me: error: conditional \"ENABLE_MESSAGE_DIGEST\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." >&2;}
|
||||||
|
{ (exit 1); exit 1; }; }
|
||||||
|
fi
|
||||||
|
if test -z "${ENABLE_MESSAGE_DIGEST_TRUE}" && test -z "${ENABLE_MESSAGE_DIGEST_FALSE}"; then
|
||||||
|
{ { echo "$as_me:$LINENO: error: conditional \"ENABLE_MESSAGE_DIGEST\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." >&5
|
||||||
|
echo "$as_me: error: conditional \"ENABLE_MESSAGE_DIGEST\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." >&2;}
|
||||||
|
{ (exit 1); exit 1; }; }
|
||||||
|
fi
|
||||||
if test -z "${ENABLE_BITTORRENT_TRUE}" && test -z "${ENABLE_BITTORRENT_FALSE}"; then
|
if test -z "${ENABLE_BITTORRENT_TRUE}" && test -z "${ENABLE_BITTORRENT_FALSE}"; then
|
||||||
{ { echo "$as_me:$LINENO: error: conditional \"ENABLE_BITTORRENT\" was never defined.
|
{ { echo "$as_me:$LINENO: error: conditional \"ENABLE_BITTORRENT\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." >&5
|
Usually this means the macro was only invoked conditionally." >&5
|
||||||
|
@ -13328,6 +13365,8 @@ LIBCARES_LIBS!$LIBCARES_LIBS$ac_delim
|
||||||
LIBCARES_CPPFLAGS!$LIBCARES_CPPFLAGS$ac_delim
|
LIBCARES_CPPFLAGS!$LIBCARES_CPPFLAGS$ac_delim
|
||||||
LIBARES_LIBS!$LIBARES_LIBS$ac_delim
|
LIBARES_LIBS!$LIBARES_LIBS$ac_delim
|
||||||
LIBARES_CPPFLAGS!$LIBARES_CPPFLAGS$ac_delim
|
LIBARES_CPPFLAGS!$LIBARES_CPPFLAGS$ac_delim
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE!$ENABLE_MESSAGE_DIGEST_TRUE$ac_delim
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE!$ENABLE_MESSAGE_DIGEST_FALSE$ac_delim
|
||||||
ENABLE_BITTORRENT_TRUE!$ENABLE_BITTORRENT_TRUE$ac_delim
|
ENABLE_BITTORRENT_TRUE!$ENABLE_BITTORRENT_TRUE$ac_delim
|
||||||
ENABLE_BITTORRENT_FALSE!$ENABLE_BITTORRENT_FALSE$ac_delim
|
ENABLE_BITTORRENT_FALSE!$ENABLE_BITTORRENT_FALSE$ac_delim
|
||||||
ENABLE_METALINK_TRUE!$ENABLE_METALINK_TRUE$ac_delim
|
ENABLE_METALINK_TRUE!$ENABLE_METALINK_TRUE$ac_delim
|
||||||
|
@ -13372,7 +13411,7 @@ LIBOBJS!$LIBOBJS$ac_delim
|
||||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then
|
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 48; then
|
||||||
break
|
break
|
||||||
elif $ac_last_try; then
|
elif $ac_last_try; then
|
||||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||||
|
|
|
@ -72,7 +72,10 @@ fi
|
||||||
|
|
||||||
if test "x$have_libgcrypt" = "xyes" || test "x$have_openssl" = "xyes"; then
|
if test "x$have_libgcrypt" = "xyes" || test "x$have_openssl" = "xyes"; then
|
||||||
AC_DEFINE([ENABLE_MESSAGE_DIGEST], [1], [Define to 1 if message digest support is enabled.])
|
AC_DEFINE([ENABLE_MESSAGE_DIGEST], [1], [Define to 1 if message digest support is enabled.])
|
||||||
|
AM_CONDITIONAL([ENABLE_MESSAGE_DIGEST], true)
|
||||||
enable_message_digest=yes
|
enable_message_digest=yes
|
||||||
|
else
|
||||||
|
AM_CONDITIONAL([ENABLE_MESSAGE_DIGEST], false)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$enable_bittorrent" = "xyes" && test "x$enable_message_digest" = "xyes"; then
|
if test "x$enable_bittorrent" = "xyes" && test "x$enable_message_digest" = "xyes"; then
|
||||||
|
|
|
@ -96,6 +96,8 @@ ENABLE_ASYNC_DNS_FALSE = @ENABLE_ASYNC_DNS_FALSE@
|
||||||
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
||||||
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
||||||
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE = @ENABLE_MESSAGE_DIGEST_FALSE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE = @ENABLE_MESSAGE_DIGEST_TRUE@
|
||||||
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
||||||
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
|
|
@ -92,6 +92,8 @@ ENABLE_ASYNC_DNS_FALSE = @ENABLE_ASYNC_DNS_FALSE@
|
||||||
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
||||||
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
||||||
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE = @ENABLE_MESSAGE_DIGEST_FALSE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE = @ENABLE_MESSAGE_DIGEST_TRUE@
|
||||||
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
||||||
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
|
|
@ -127,6 +127,7 @@ void ConsoleDownloadEngine::sendStatistics(long long int currentSize, long long
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
{
|
{
|
||||||
CheckIntegrityEntryHandle entry = _checkIntegrityMan->getFirstCheckIntegrityEntry();
|
CheckIntegrityEntryHandle entry = _checkIntegrityMan->getFirstCheckIntegrityEntry();
|
||||||
if(!entry.isNull()) {
|
if(!entry.isNull()) {
|
||||||
|
@ -149,6 +150,7 @@ void ConsoleDownloadEngine::sendStatistics(long long int currentSize, long long
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
cout << flush;
|
cout << flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,9 @@
|
||||||
#include "InitiateConnectionCommandFactory.h"
|
#include "InitiateConnectionCommandFactory.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "prefs.h"
|
#include "prefs.h"
|
||||||
#include "ChecksumCommand.h"
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
# include "ChecksumCommand.h"
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
DownloadCommand::DownloadCommand(int cuid,
|
DownloadCommand::DownloadCommand(int cuid,
|
||||||
|
@ -126,12 +128,14 @@ bool DownloadCommand::executeInternal() {
|
||||||
|
|
||||||
bool DownloadCommand::prepareForNextSegment() {
|
bool DownloadCommand::prepareForNextSegment() {
|
||||||
if(_requestGroup->getSegmentMan()->finished()) {
|
if(_requestGroup->getSegmentMan()->finished()) {
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
if(!_requestGroup->getChecksum().isNull() &&
|
if(!_requestGroup->getChecksum().isNull() &&
|
||||||
!_requestGroup->getChecksum()->isEmpty()) {
|
!_requestGroup->getChecksum()->isEmpty()) {
|
||||||
ChecksumCommand* command = new ChecksumCommand(cuid, _requestGroup, e);
|
ChecksumCommand* command = new ChecksumCommand(cuid, _requestGroup, e);
|
||||||
command->initValidator();
|
command->initValidator();
|
||||||
e->commands.push_back(command);
|
e->commands.push_back(command);
|
||||||
}
|
}
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
// Merge segment with next segment, if segment.index+1 == nextSegment.index
|
// Merge segment with next segment, if segment.index+1 == nextSegment.index
|
||||||
|
|
|
@ -48,8 +48,12 @@ using namespace std;
|
||||||
DownloadEngine::DownloadEngine():logger(LogFactory::getInstance()),
|
DownloadEngine::DownloadEngine():logger(LogFactory::getInstance()),
|
||||||
noWait(false),
|
noWait(false),
|
||||||
_requestGroupMan(0),
|
_requestGroupMan(0),
|
||||||
_fileAllocationMan(0),
|
_fileAllocationMan(0)
|
||||||
_checkIntegrityMan(0) {}
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
,
|
||||||
|
_checkIntegrityMan(0)
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
|
{}
|
||||||
|
|
||||||
DownloadEngine::~DownloadEngine() {
|
DownloadEngine::~DownloadEngine() {
|
||||||
cleanQueue();
|
cleanQueue();
|
||||||
|
|
|
@ -44,7 +44,9 @@
|
||||||
#include "NameResolver.h"
|
#include "NameResolver.h"
|
||||||
#include "RequestGroupMan.h"
|
#include "RequestGroupMan.h"
|
||||||
#include "FileAllocationMan.h"
|
#include "FileAllocationMan.h"
|
||||||
#include "CheckIntegrityMan.h"
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
# include "CheckIntegrityMan.h"
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
typedef deque<SocketHandle> Sockets;
|
typedef deque<SocketHandle> Sockets;
|
||||||
|
|
||||||
|
@ -121,7 +123,9 @@ public:
|
||||||
Commands commands;
|
Commands commands;
|
||||||
RequestGroupManHandle _requestGroupMan;
|
RequestGroupManHandle _requestGroupMan;
|
||||||
FileAllocationManHandle _fileAllocationMan;
|
FileAllocationManHandle _fileAllocationMan;
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
CheckIntegrityManHandle _checkIntegrityMan;
|
CheckIntegrityManHandle _checkIntegrityMan;
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
const Option* option;
|
const Option* option;
|
||||||
|
|
||||||
DownloadEngine();
|
DownloadEngine();
|
||||||
|
|
|
@ -43,7 +43,9 @@
|
||||||
#include "CUIDCounter.h"
|
#include "CUIDCounter.h"
|
||||||
#include "FileAllocationDispatcherCommand.h"
|
#include "FileAllocationDispatcherCommand.h"
|
||||||
#include "FileAllocationMan.h"
|
#include "FileAllocationMan.h"
|
||||||
#include "CheckIntegrityMan.h"
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
# include "CheckIntegrityMan.h"
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
#ifdef ENABLE_BITTORRENT
|
#ifdef ENABLE_BITTORRENT
|
||||||
# include "PeerListenCommand.h"
|
# include "PeerListenCommand.h"
|
||||||
# include "TrackerWatcherCommand.h"
|
# include "TrackerWatcherCommand.h"
|
||||||
|
@ -87,8 +89,9 @@ DownloadEngineFactory::newConsoleEngine(const Option* op,
|
||||||
requestGroupMan->addReservedGroup(reservedSet);
|
requestGroupMan->addReservedGroup(reservedSet);
|
||||||
e->_requestGroupMan = requestGroupMan;
|
e->_requestGroupMan = requestGroupMan;
|
||||||
e->_fileAllocationMan = new FileAllocationMan();
|
e->_fileAllocationMan = new FileAllocationMan();
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
e->_checkIntegrityMan = new CheckIntegrityMan();
|
e->_checkIntegrityMan = new CheckIntegrityMan();
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
e->commands.push_back(new FillRequestGroupCommand(CUIDCounterSingletonHolder::instance()->newID(), e, 1));
|
e->commands.push_back(new FillRequestGroupCommand(CUIDCounterSingletonHolder::instance()->newID(), e, 1));
|
||||||
e->commands.push_back(new FileAllocationDispatcherCommand(CUIDCounterSingletonHolder::instance()->newID(), e));
|
e->commands.push_back(new FileAllocationDispatcherCommand(CUIDCounterSingletonHolder::instance()->newID(), e));
|
||||||
return e;
|
return e;
|
||||||
|
|
|
@ -63,7 +63,6 @@ SRCS = Socket.h\
|
||||||
FileAllocator.h\
|
FileAllocator.h\
|
||||||
FileAllocationMonitor.cc FileAllocationMonitor.h\
|
FileAllocationMonitor.cc FileAllocationMonitor.h\
|
||||||
ConsoleFileAllocationMonitor.cc ConsoleFileAllocationMonitor.h\
|
ConsoleFileAllocationMonitor.cc ConsoleFileAllocationMonitor.h\
|
||||||
ChunkChecksumValidator.cc ChunkChecksumValidator.h\
|
|
||||||
HttpResponse.cc HttpResponse.h\
|
HttpResponse.cc HttpResponse.h\
|
||||||
HttpRequest.cc HttpRequest.h\
|
HttpRequest.cc HttpRequest.h\
|
||||||
Range.h\
|
Range.h\
|
||||||
|
@ -87,18 +86,12 @@ SRCS = Socket.h\
|
||||||
FillRequestGroupCommand.cc FillRequestGroupCommand.h\
|
FillRequestGroupCommand.cc FillRequestGroupCommand.h\
|
||||||
FileAllocationDispatcherCommand.cc FileAllocationDispatcherCommand.h\
|
FileAllocationDispatcherCommand.cc FileAllocationDispatcherCommand.h\
|
||||||
FileAllocationEntry.cc FileAllocationEntry.h\
|
FileAllocationEntry.cc FileAllocationEntry.h\
|
||||||
IteratableChunkChecksumValidator.cc IteratableChunkChecksumValidator.h\
|
|
||||||
CheckIntegrityCommand.cc CheckIntegrityCommand.h\
|
|
||||||
MultiUrlRequestInfo.cc MultiUrlRequestInfo.h\
|
MultiUrlRequestInfo.cc MultiUrlRequestInfo.h\
|
||||||
UriFileListParser.cc UriFileListParser.h\
|
UriFileListParser.cc UriFileListParser.h\
|
||||||
SegmentManFactory.h\
|
SegmentManFactory.h\
|
||||||
AbstractSegmentManFactory.h\
|
AbstractSegmentManFactory.h\
|
||||||
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h\
|
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h\
|
||||||
RealtimeCommand.cc RealtimeCommand.h\
|
RealtimeCommand.cc RealtimeCommand.h\
|
||||||
IteratableChecksumValidator.cc IteratableChecksumValidator.h\
|
|
||||||
ChecksumCommand.cc ChecksumCommand.h\
|
|
||||||
CheckIntegrityEntry.cc CheckIntegrityEntry.h\
|
|
||||||
CheckIntegrityMan.h\
|
|
||||||
ProgressAwareEntry.h\
|
ProgressAwareEntry.h\
|
||||||
RequestGroupEntry.cc RequestGroupEntry.h\
|
RequestGroupEntry.cc RequestGroupEntry.h\
|
||||||
Cookie.cc Cookie.h\
|
Cookie.cc Cookie.h\
|
||||||
|
@ -108,6 +101,16 @@ SRCS = Socket.h\
|
||||||
FileEntry.cc FileEntry.h
|
FileEntry.cc FileEntry.h
|
||||||
# debug_new.cpp
|
# debug_new.cpp
|
||||||
|
|
||||||
|
if ENABLE_MESSAGE_DIGEST
|
||||||
|
SRCS += ChunkChecksumValidator.cc ChunkChecksumValidator.h\
|
||||||
|
IteratableChunkChecksumValidator.cc IteratableChunkChecksumValidator.h\
|
||||||
|
IteratableChecksumValidator.cc IteratableChecksumValidator.h\
|
||||||
|
ChecksumCommand.cc ChecksumCommand.h\
|
||||||
|
CheckIntegrityCommand.cc CheckIntegrityCommand.h\
|
||||||
|
CheckIntegrityEntry.cc CheckIntegrityEntry.h\
|
||||||
|
CheckIntegrityMan.h
|
||||||
|
endif # ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
if ENABLE_BITTORRENT
|
if ENABLE_BITTORRENT
|
||||||
SRCS += MetaEntry.h\
|
SRCS += MetaEntry.h\
|
||||||
Data.cc Data.h\
|
Data.cc Data.h\
|
||||||
|
@ -220,15 +223,15 @@ SRCS += Metalinker.cc Metalinker.h\
|
||||||
MetalinkResource.cc MetalinkResource.h\
|
MetalinkResource.cc MetalinkResource.h\
|
||||||
MetalinkProcessor.h\
|
MetalinkProcessor.h\
|
||||||
Xml2MetalinkProcessor.cc Xml2MetalinkProcessor.h\
|
Xml2MetalinkProcessor.cc Xml2MetalinkProcessor.h\
|
||||||
MetalinkRequestInfo.cc MetalinkRequestInfo.h\
|
MetalinkRequestInfo.cc MetalinkRequestInfo.h
|
||||||
MetalinkChunkChecksum.h
|
# MetalinkChunkChecksum.h
|
||||||
endif # ENABLE_METALINK
|
endif # ENABLE_METALINK
|
||||||
|
|
||||||
noinst_LIBRARIES = libaria2c.a
|
noinst_LIBRARIES = libaria2c.a
|
||||||
libaria2c_a_SOURCES = $(SRCS)
|
libaria2c_a_SOURCES = $(SRCS)
|
||||||
aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\
|
aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\
|
||||||
@LIBGCRYPT_LIBS@ @OPENSSL_LIBS@ @XML_LIBS@ @LIBARES_LIBS@\
|
@LIBGCRYPT_LIBS@ @OPENSSL_LIBS@ @XML_LIBS@ @LIBARES_LIBS@\
|
||||||
@LIBCARES_LIBS@ -lprofiler
|
@LIBCARES_LIBS@ # -lprofiler
|
||||||
#aria2c_LDFLAGS = #-pg
|
#aria2c_LDFLAGS = #-pg
|
||||||
AM_CPPFLAGS = -Wall\
|
AM_CPPFLAGS = -Wall\
|
||||||
-I../lib -I../intl -I$(top_srcdir)/intl\
|
-I../lib -I../intl -I$(top_srcdir)/intl\
|
||||||
|
|
|
@ -39,7 +39,15 @@ build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
bin_PROGRAMS = aria2c$(EXEEXT)
|
bin_PROGRAMS = aria2c$(EXEEXT)
|
||||||
# debug_new.cpp
|
# debug_new.cpp
|
||||||
@ENABLE_BITTORRENT_TRUE@am__append_1 = MetaEntry.h\
|
@ENABLE_MESSAGE_DIGEST_TRUE@am__append_1 = ChunkChecksumValidator.cc ChunkChecksumValidator.h\
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ IteratableChunkChecksumValidator.cc IteratableChunkChecksumValidator.h\
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ IteratableChecksumValidator.cc IteratableChecksumValidator.h\
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ ChecksumCommand.cc ChecksumCommand.h\
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityCommand.cc CheckIntegrityCommand.h\
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityEntry.cc CheckIntegrityEntry.h\
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityMan.h
|
||||||
|
|
||||||
|
@ENABLE_BITTORRENT_TRUE@am__append_2 = MetaEntry.h\
|
||||||
@ENABLE_BITTORRENT_TRUE@ Data.cc Data.h\
|
@ENABLE_BITTORRENT_TRUE@ Data.cc Data.h\
|
||||||
@ENABLE_BITTORRENT_TRUE@ Dictionary.cc Dictionary.h\
|
@ENABLE_BITTORRENT_TRUE@ Dictionary.cc Dictionary.h\
|
||||||
@ENABLE_BITTORRENT_TRUE@ List.cc List.h\
|
@ENABLE_BITTORRENT_TRUE@ List.cc List.h\
|
||||||
|
@ -143,13 +151,12 @@ bin_PROGRAMS = aria2c$(EXEEXT)
|
||||||
@ENABLE_BITTORRENT_TRUE@ ActivePeerConnectionCommand.cc ActivePeerConnectionCommand.h\
|
@ENABLE_BITTORRENT_TRUE@ ActivePeerConnectionCommand.cc ActivePeerConnectionCommand.h\
|
||||||
@ENABLE_BITTORRENT_TRUE@ TrackerSegmentManFactory.cc TrackerSegmentManFactory.h
|
@ENABLE_BITTORRENT_TRUE@ TrackerSegmentManFactory.cc TrackerSegmentManFactory.h
|
||||||
|
|
||||||
@ENABLE_METALINK_TRUE@am__append_2 = Metalinker.cc Metalinker.h\
|
@ENABLE_METALINK_TRUE@am__append_3 = Metalinker.cc Metalinker.h\
|
||||||
@ENABLE_METALINK_TRUE@ MetalinkEntry.cc MetalinkEntry.h\
|
@ENABLE_METALINK_TRUE@ MetalinkEntry.cc MetalinkEntry.h\
|
||||||
@ENABLE_METALINK_TRUE@ MetalinkResource.cc MetalinkResource.h\
|
@ENABLE_METALINK_TRUE@ MetalinkResource.cc MetalinkResource.h\
|
||||||
@ENABLE_METALINK_TRUE@ MetalinkProcessor.h\
|
@ENABLE_METALINK_TRUE@ MetalinkProcessor.h\
|
||||||
@ENABLE_METALINK_TRUE@ Xml2MetalinkProcessor.cc Xml2MetalinkProcessor.h\
|
@ENABLE_METALINK_TRUE@ Xml2MetalinkProcessor.cc Xml2MetalinkProcessor.h\
|
||||||
@ENABLE_METALINK_TRUE@ MetalinkRequestInfo.cc MetalinkRequestInfo.h\
|
@ENABLE_METALINK_TRUE@ MetalinkRequestInfo.cc MetalinkRequestInfo.h
|
||||||
@ENABLE_METALINK_TRUE@ MetalinkChunkChecksum.h
|
|
||||||
|
|
||||||
subdir = src
|
subdir = src
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in alloca.c
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in alloca.c
|
||||||
|
@ -212,8 +219,7 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \
|
||||||
Randomizer.h SimpleRandomizer.cc SimpleRandomizer.h \
|
Randomizer.h SimpleRandomizer.cc SimpleRandomizer.h \
|
||||||
FileAllocator.h FileAllocationMonitor.cc \
|
FileAllocator.h FileAllocationMonitor.cc \
|
||||||
FileAllocationMonitor.h ConsoleFileAllocationMonitor.cc \
|
FileAllocationMonitor.h ConsoleFileAllocationMonitor.cc \
|
||||||
ConsoleFileAllocationMonitor.h ChunkChecksumValidator.cc \
|
ConsoleFileAllocationMonitor.h HttpResponse.cc HttpResponse.h \
|
||||||
ChunkChecksumValidator.h HttpResponse.cc HttpResponse.h \
|
|
||||||
HttpRequest.cc HttpRequest.h Range.h \
|
HttpRequest.cc HttpRequest.h Range.h \
|
||||||
AbstractProxyRequestCommand.cc AbstractProxyRequestCommand.h \
|
AbstractProxyRequestCommand.cc AbstractProxyRequestCommand.h \
|
||||||
AbstractProxyResponseCommand.cc AbstractProxyResponseCommand.h \
|
AbstractProxyResponseCommand.cc AbstractProxyResponseCommand.h \
|
||||||
|
@ -229,21 +235,23 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \
|
||||||
FileAllocationCommand.h FillRequestGroupCommand.cc \
|
FileAllocationCommand.h FillRequestGroupCommand.cc \
|
||||||
FillRequestGroupCommand.h FileAllocationDispatcherCommand.cc \
|
FillRequestGroupCommand.h FileAllocationDispatcherCommand.cc \
|
||||||
FileAllocationDispatcherCommand.h FileAllocationEntry.cc \
|
FileAllocationDispatcherCommand.h FileAllocationEntry.cc \
|
||||||
FileAllocationEntry.h IteratableChunkChecksumValidator.cc \
|
FileAllocationEntry.h MultiUrlRequestInfo.cc \
|
||||||
IteratableChunkChecksumValidator.h CheckIntegrityCommand.cc \
|
|
||||||
CheckIntegrityCommand.h MultiUrlRequestInfo.cc \
|
|
||||||
MultiUrlRequestInfo.h UriFileListParser.cc UriFileListParser.h \
|
MultiUrlRequestInfo.h UriFileListParser.cc UriFileListParser.h \
|
||||||
SegmentManFactory.h AbstractSegmentManFactory.h \
|
SegmentManFactory.h AbstractSegmentManFactory.h \
|
||||||
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h \
|
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h \
|
||||||
RealtimeCommand.cc RealtimeCommand.h \
|
RealtimeCommand.cc RealtimeCommand.h ProgressAwareEntry.h \
|
||||||
IteratableChecksumValidator.cc IteratableChecksumValidator.h \
|
|
||||||
ChecksumCommand.cc ChecksumCommand.h CheckIntegrityEntry.cc \
|
|
||||||
CheckIntegrityEntry.h CheckIntegrityMan.h ProgressAwareEntry.h \
|
|
||||||
RequestGroupEntry.cc RequestGroupEntry.h Cookie.cc Cookie.h \
|
RequestGroupEntry.cc RequestGroupEntry.h Cookie.cc Cookie.h \
|
||||||
CookieParser.cc CookieParser.h CookieBoxFactory.cc \
|
CookieParser.cc CookieParser.h CookieBoxFactory.cc \
|
||||||
CookieBoxFactory.h HttpHeaderProcessor.cc \
|
CookieBoxFactory.h HttpHeaderProcessor.cc \
|
||||||
HttpHeaderProcessor.h FileEntry.cc FileEntry.h MetaEntry.h \
|
HttpHeaderProcessor.h FileEntry.cc FileEntry.h \
|
||||||
Data.cc Data.h Dictionary.cc Dictionary.h List.cc List.h \
|
ChunkChecksumValidator.cc ChunkChecksumValidator.h \
|
||||||
|
IteratableChunkChecksumValidator.cc \
|
||||||
|
IteratableChunkChecksumValidator.h \
|
||||||
|
IteratableChecksumValidator.cc IteratableChecksumValidator.h \
|
||||||
|
ChecksumCommand.cc ChecksumCommand.h CheckIntegrityCommand.cc \
|
||||||
|
CheckIntegrityCommand.h CheckIntegrityEntry.cc \
|
||||||
|
CheckIntegrityEntry.h CheckIntegrityMan.h MetaEntry.h Data.cc \
|
||||||
|
Data.h Dictionary.cc Dictionary.h List.cc List.h \
|
||||||
MetaFileUtil.cc MetaFileUtil.h MetaEntryVisitor.h \
|
MetaFileUtil.cc MetaFileUtil.h MetaEntryVisitor.h \
|
||||||
ShaVisitor.cc ShaVisitor.h PeerConnection.cc PeerConnection.h \
|
ShaVisitor.cc ShaVisitor.h PeerConnection.cc PeerConnection.h \
|
||||||
PeerMessageUtil.cc PeerMessageUtil.h PeerAbstractCommand.cc \
|
PeerMessageUtil.cc PeerMessageUtil.h PeerAbstractCommand.cc \
|
||||||
|
@ -311,9 +319,15 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \
|
||||||
Metalinker.cc Metalinker.h MetalinkEntry.cc MetalinkEntry.h \
|
Metalinker.cc Metalinker.h MetalinkEntry.cc MetalinkEntry.h \
|
||||||
MetalinkResource.cc MetalinkResource.h MetalinkProcessor.h \
|
MetalinkResource.cc MetalinkResource.h MetalinkProcessor.h \
|
||||||
Xml2MetalinkProcessor.cc Xml2MetalinkProcessor.h \
|
Xml2MetalinkProcessor.cc Xml2MetalinkProcessor.h \
|
||||||
MetalinkRequestInfo.cc MetalinkRequestInfo.h \
|
MetalinkRequestInfo.cc MetalinkRequestInfo.h
|
||||||
MetalinkChunkChecksum.h
|
@ENABLE_MESSAGE_DIGEST_TRUE@am__objects_1 = \
|
||||||
@ENABLE_BITTORRENT_TRUE@am__objects_1 = Data.$(OBJEXT) \
|
@ENABLE_MESSAGE_DIGEST_TRUE@ ChunkChecksumValidator.$(OBJEXT) \
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ IteratableChunkChecksumValidator.$(OBJEXT) \
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ IteratableChecksumValidator.$(OBJEXT) \
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ ChecksumCommand.$(OBJEXT) \
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityCommand.$(OBJEXT) \
|
||||||
|
@ENABLE_MESSAGE_DIGEST_TRUE@ CheckIntegrityEntry.$(OBJEXT)
|
||||||
|
@ENABLE_BITTORRENT_TRUE@am__objects_2 = Data.$(OBJEXT) \
|
||||||
@ENABLE_BITTORRENT_TRUE@ Dictionary.$(OBJEXT) List.$(OBJEXT) \
|
@ENABLE_BITTORRENT_TRUE@ Dictionary.$(OBJEXT) List.$(OBJEXT) \
|
||||||
@ENABLE_BITTORRENT_TRUE@ MetaFileUtil.$(OBJEXT) \
|
@ENABLE_BITTORRENT_TRUE@ MetaFileUtil.$(OBJEXT) \
|
||||||
@ENABLE_BITTORRENT_TRUE@ ShaVisitor.$(OBJEXT) \
|
@ENABLE_BITTORRENT_TRUE@ ShaVisitor.$(OBJEXT) \
|
||||||
|
@ -377,12 +391,12 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \
|
||||||
@ENABLE_BITTORRENT_TRUE@ DefaultBtInteractive.$(OBJEXT) \
|
@ENABLE_BITTORRENT_TRUE@ DefaultBtInteractive.$(OBJEXT) \
|
||||||
@ENABLE_BITTORRENT_TRUE@ ActivePeerConnectionCommand.$(OBJEXT) \
|
@ENABLE_BITTORRENT_TRUE@ ActivePeerConnectionCommand.$(OBJEXT) \
|
||||||
@ENABLE_BITTORRENT_TRUE@ TrackerSegmentManFactory.$(OBJEXT)
|
@ENABLE_BITTORRENT_TRUE@ TrackerSegmentManFactory.$(OBJEXT)
|
||||||
@ENABLE_METALINK_TRUE@am__objects_2 = Metalinker.$(OBJEXT) \
|
@ENABLE_METALINK_TRUE@am__objects_3 = Metalinker.$(OBJEXT) \
|
||||||
@ENABLE_METALINK_TRUE@ MetalinkEntry.$(OBJEXT) \
|
@ENABLE_METALINK_TRUE@ MetalinkEntry.$(OBJEXT) \
|
||||||
@ENABLE_METALINK_TRUE@ MetalinkResource.$(OBJEXT) \
|
@ENABLE_METALINK_TRUE@ MetalinkResource.$(OBJEXT) \
|
||||||
@ENABLE_METALINK_TRUE@ Xml2MetalinkProcessor.$(OBJEXT) \
|
@ENABLE_METALINK_TRUE@ Xml2MetalinkProcessor.$(OBJEXT) \
|
||||||
@ENABLE_METALINK_TRUE@ MetalinkRequestInfo.$(OBJEXT)
|
@ENABLE_METALINK_TRUE@ MetalinkRequestInfo.$(OBJEXT)
|
||||||
am__objects_3 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \
|
am__objects_4 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \
|
||||||
AbstractCommand.$(OBJEXT) \
|
AbstractCommand.$(OBJEXT) \
|
||||||
InitiateConnectionCommandFactory.$(OBJEXT) \
|
InitiateConnectionCommandFactory.$(OBJEXT) \
|
||||||
DownloadCommand.$(OBJEXT) \
|
DownloadCommand.$(OBJEXT) \
|
||||||
|
@ -406,8 +420,7 @@ am__objects_3 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \
|
||||||
DownloadEngineFactory.$(OBJEXT) SpeedCalc.$(OBJEXT) \
|
DownloadEngineFactory.$(OBJEXT) SpeedCalc.$(OBJEXT) \
|
||||||
BitfieldMan.$(OBJEXT) BitfieldManFactory.$(OBJEXT) \
|
BitfieldMan.$(OBJEXT) BitfieldManFactory.$(OBJEXT) \
|
||||||
SimpleRandomizer.$(OBJEXT) FileAllocationMonitor.$(OBJEXT) \
|
SimpleRandomizer.$(OBJEXT) FileAllocationMonitor.$(OBJEXT) \
|
||||||
ConsoleFileAllocationMonitor.$(OBJEXT) \
|
ConsoleFileAllocationMonitor.$(OBJEXT) HttpResponse.$(OBJEXT) \
|
||||||
ChunkChecksumValidator.$(OBJEXT) HttpResponse.$(OBJEXT) \
|
|
||||||
HttpRequest.$(OBJEXT) AbstractProxyRequestCommand.$(OBJEXT) \
|
HttpRequest.$(OBJEXT) AbstractProxyRequestCommand.$(OBJEXT) \
|
||||||
AbstractProxyResponseCommand.$(OBJEXT) Netrc.$(OBJEXT) \
|
AbstractProxyResponseCommand.$(OBJEXT) Netrc.$(OBJEXT) \
|
||||||
AuthConfig.$(OBJEXT) DefaultAuthResolver.$(OBJEXT) \
|
AuthConfig.$(OBJEXT) DefaultAuthResolver.$(OBJEXT) \
|
||||||
|
@ -418,18 +431,14 @@ am__objects_3 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \
|
||||||
RequestGroupMan.$(OBJEXT) FileAllocationCommand.$(OBJEXT) \
|
RequestGroupMan.$(OBJEXT) FileAllocationCommand.$(OBJEXT) \
|
||||||
FillRequestGroupCommand.$(OBJEXT) \
|
FillRequestGroupCommand.$(OBJEXT) \
|
||||||
FileAllocationDispatcherCommand.$(OBJEXT) \
|
FileAllocationDispatcherCommand.$(OBJEXT) \
|
||||||
FileAllocationEntry.$(OBJEXT) \
|
FileAllocationEntry.$(OBJEXT) MultiUrlRequestInfo.$(OBJEXT) \
|
||||||
IteratableChunkChecksumValidator.$(OBJEXT) \
|
|
||||||
CheckIntegrityCommand.$(OBJEXT) MultiUrlRequestInfo.$(OBJEXT) \
|
|
||||||
UriFileListParser.$(OBJEXT) DefaultSegmentManFactory.$(OBJEXT) \
|
UriFileListParser.$(OBJEXT) DefaultSegmentManFactory.$(OBJEXT) \
|
||||||
RealtimeCommand.$(OBJEXT) \
|
RealtimeCommand.$(OBJEXT) RequestGroupEntry.$(OBJEXT) \
|
||||||
IteratableChecksumValidator.$(OBJEXT) \
|
Cookie.$(OBJEXT) CookieParser.$(OBJEXT) \
|
||||||
ChecksumCommand.$(OBJEXT) CheckIntegrityEntry.$(OBJEXT) \
|
CookieBoxFactory.$(OBJEXT) HttpHeaderProcessor.$(OBJEXT) \
|
||||||
RequestGroupEntry.$(OBJEXT) Cookie.$(OBJEXT) \
|
FileEntry.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
|
||||||
CookieParser.$(OBJEXT) CookieBoxFactory.$(OBJEXT) \
|
$(am__objects_3)
|
||||||
HttpHeaderProcessor.$(OBJEXT) FileEntry.$(OBJEXT) \
|
am_libaria2c_a_OBJECTS = $(am__objects_4)
|
||||||
$(am__objects_1) $(am__objects_2)
|
|
||||||
am_libaria2c_a_OBJECTS = $(am__objects_3)
|
|
||||||
libaria2c_a_OBJECTS = $(am_libaria2c_a_OBJECTS)
|
libaria2c_a_OBJECTS = $(am_libaria2c_a_OBJECTS)
|
||||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||||
|
@ -488,6 +497,8 @@ ENABLE_ASYNC_DNS_FALSE = @ENABLE_ASYNC_DNS_FALSE@
|
||||||
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
||||||
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
||||||
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE = @ENABLE_MESSAGE_DIGEST_FALSE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE = @ENABLE_MESSAGE_DIGEST_TRUE@
|
||||||
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
||||||
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
@ -633,8 +644,7 @@ SRCS = Socket.h SocketCore.cc SocketCore.h Command.cc Command.h \
|
||||||
Randomizer.h SimpleRandomizer.cc SimpleRandomizer.h \
|
Randomizer.h SimpleRandomizer.cc SimpleRandomizer.h \
|
||||||
FileAllocator.h FileAllocationMonitor.cc \
|
FileAllocator.h FileAllocationMonitor.cc \
|
||||||
FileAllocationMonitor.h ConsoleFileAllocationMonitor.cc \
|
FileAllocationMonitor.h ConsoleFileAllocationMonitor.cc \
|
||||||
ConsoleFileAllocationMonitor.h ChunkChecksumValidator.cc \
|
ConsoleFileAllocationMonitor.h HttpResponse.cc HttpResponse.h \
|
||||||
ChunkChecksumValidator.h HttpResponse.cc HttpResponse.h \
|
|
||||||
HttpRequest.cc HttpRequest.h Range.h \
|
HttpRequest.cc HttpRequest.h Range.h \
|
||||||
AbstractProxyRequestCommand.cc AbstractProxyRequestCommand.h \
|
AbstractProxyRequestCommand.cc AbstractProxyRequestCommand.h \
|
||||||
AbstractProxyResponseCommand.cc AbstractProxyResponseCommand.h \
|
AbstractProxyResponseCommand.cc AbstractProxyResponseCommand.h \
|
||||||
|
@ -650,26 +660,22 @@ SRCS = Socket.h SocketCore.cc SocketCore.h Command.cc Command.h \
|
||||||
FileAllocationCommand.h FillRequestGroupCommand.cc \
|
FileAllocationCommand.h FillRequestGroupCommand.cc \
|
||||||
FillRequestGroupCommand.h FileAllocationDispatcherCommand.cc \
|
FillRequestGroupCommand.h FileAllocationDispatcherCommand.cc \
|
||||||
FileAllocationDispatcherCommand.h FileAllocationEntry.cc \
|
FileAllocationDispatcherCommand.h FileAllocationEntry.cc \
|
||||||
FileAllocationEntry.h IteratableChunkChecksumValidator.cc \
|
FileAllocationEntry.h MultiUrlRequestInfo.cc \
|
||||||
IteratableChunkChecksumValidator.h CheckIntegrityCommand.cc \
|
|
||||||
CheckIntegrityCommand.h MultiUrlRequestInfo.cc \
|
|
||||||
MultiUrlRequestInfo.h UriFileListParser.cc UriFileListParser.h \
|
MultiUrlRequestInfo.h UriFileListParser.cc UriFileListParser.h \
|
||||||
SegmentManFactory.h AbstractSegmentManFactory.h \
|
SegmentManFactory.h AbstractSegmentManFactory.h \
|
||||||
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h \
|
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h \
|
||||||
RealtimeCommand.cc RealtimeCommand.h \
|
RealtimeCommand.cc RealtimeCommand.h ProgressAwareEntry.h \
|
||||||
IteratableChecksumValidator.cc IteratableChecksumValidator.h \
|
|
||||||
ChecksumCommand.cc ChecksumCommand.h CheckIntegrityEntry.cc \
|
|
||||||
CheckIntegrityEntry.h CheckIntegrityMan.h ProgressAwareEntry.h \
|
|
||||||
RequestGroupEntry.cc RequestGroupEntry.h Cookie.cc Cookie.h \
|
RequestGroupEntry.cc RequestGroupEntry.h Cookie.cc Cookie.h \
|
||||||
CookieParser.cc CookieParser.h CookieBoxFactory.cc \
|
CookieParser.cc CookieParser.h CookieBoxFactory.cc \
|
||||||
CookieBoxFactory.h HttpHeaderProcessor.cc \
|
CookieBoxFactory.h HttpHeaderProcessor.cc \
|
||||||
HttpHeaderProcessor.h FileEntry.cc FileEntry.h $(am__append_1) \
|
HttpHeaderProcessor.h FileEntry.cc FileEntry.h $(am__append_1) \
|
||||||
$(am__append_2)
|
$(am__append_2) $(am__append_3)
|
||||||
|
# MetalinkChunkChecksum.h
|
||||||
noinst_LIBRARIES = libaria2c.a
|
noinst_LIBRARIES = libaria2c.a
|
||||||
libaria2c_a_SOURCES = $(SRCS)
|
libaria2c_a_SOURCES = $(SRCS)
|
||||||
aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\
|
aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\
|
||||||
@LIBGCRYPT_LIBS@ @OPENSSL_LIBS@ @XML_LIBS@ @LIBARES_LIBS@\
|
@LIBGCRYPT_LIBS@ @OPENSSL_LIBS@ @XML_LIBS@ @LIBARES_LIBS@\
|
||||||
@LIBCARES_LIBS@ -lprofiler
|
@LIBCARES_LIBS@ # -lprofiler
|
||||||
|
|
||||||
#aria2c_LDFLAGS = #-pg
|
#aria2c_LDFLAGS = #-pg
|
||||||
AM_CPPFLAGS = -Wall\
|
AM_CPPFLAGS = -Wall\
|
||||||
|
|
|
@ -44,10 +44,12 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "DlAbortEx.h"
|
#include "DlAbortEx.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
#include "CheckIntegrityCommand.h"
|
|
||||||
#include "FatalException.h"
|
#include "FatalException.h"
|
||||||
#include "CheckIntegrityEntry.h"
|
|
||||||
#include "DownloadCommand.h"
|
#include "DownloadCommand.h"
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
#include "CheckIntegrityCommand.h"
|
||||||
|
#include "CheckIntegrityEntry.h"
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
|
||||||
SegmentManHandle RequestGroup::initSegmentMan()
|
SegmentManHandle RequestGroup::initSegmentMan()
|
||||||
|
@ -188,11 +190,15 @@ void RequestGroup::loadAndOpenFile()
|
||||||
} else {
|
} else {
|
||||||
shouldCancelDownloadForSafety();
|
shouldCancelDownloadForSafety();
|
||||||
initBitfield();
|
initBitfield();
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
if(fileExists() && _option->get(PREF_CHECK_INTEGRITY) == V_TRUE) {
|
if(fileExists() && _option->get(PREF_CHECK_INTEGRITY) == V_TRUE) {
|
||||||
openExistingFile();
|
openExistingFile();
|
||||||
} else {
|
} else {
|
||||||
initAndOpenFile();
|
initAndOpenFile();
|
||||||
}
|
}
|
||||||
|
#else // ENABLE_MESSAGE_DIGEST
|
||||||
|
initAndOpenFile();
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,6 +222,7 @@ bool RequestGroup::downloadFinishedByFileLength()
|
||||||
void RequestGroup::prepareForNextAction(int cuid, const RequestHandle& req, DownloadEngine* e, DownloadCommand* downloadCommand)
|
void RequestGroup::prepareForNextAction(int cuid, const RequestHandle& req, DownloadEngine* e, DownloadCommand* downloadCommand)
|
||||||
{
|
{
|
||||||
File existingFile(getFilePath());
|
File existingFile(getFilePath());
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
if(existingFile.size() > 0 && _option->get(PREF_CHECK_INTEGRITY) == V_TRUE) {
|
if(existingFile.size() > 0 && _option->get(PREF_CHECK_INTEGRITY) == V_TRUE) {
|
||||||
// purge SegmentEntries
|
// purge SegmentEntries
|
||||||
_segmentMan->purgeSegmentEntry();
|
_segmentMan->purgeSegmentEntry();
|
||||||
|
@ -225,20 +232,22 @@ void RequestGroup::prepareForNextAction(int cuid, const RequestHandle& req, Down
|
||||||
entry->initValidator();
|
entry->initValidator();
|
||||||
CheckIntegrityCommand* command = new CheckIntegrityCommand(cuid, this, e, entry);
|
CheckIntegrityCommand* command = new CheckIntegrityCommand(cuid, this, e, entry);
|
||||||
e->commands.push_back(command);
|
e->commands.push_back(command);
|
||||||
} else if(needsFileAllocation()) {
|
} else
|
||||||
FileAllocationEntryHandle entry = new FileAllocationEntry(cuid, req, this, existingFile.size());
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
entry->setNextDownloadCommand(downloadCommand);
|
if(needsFileAllocation()) {
|
||||||
e->_fileAllocationMan->pushFileAllocationEntry(entry);
|
FileAllocationEntryHandle entry = new FileAllocationEntry(cuid, req, this, existingFile.size());
|
||||||
} else {
|
entry->setNextDownloadCommand(downloadCommand);
|
||||||
if(downloadCommand) {
|
e->_fileAllocationMan->pushFileAllocationEntry(entry);
|
||||||
e->commands.push_back(downloadCommand);
|
|
||||||
} else {
|
} else {
|
||||||
Commands commands = createNextCommandWithAdj(e, -1);
|
if(downloadCommand) {
|
||||||
Command* command = InitiateConnectionCommandFactory::createInitiateConnectionCommand(cuid, req, this, e);
|
e->commands.push_back(downloadCommand);
|
||||||
commands.push_front(command);
|
} else {
|
||||||
e->addCommand(commands);
|
Commands commands = createNextCommandWithAdj(e, -1);
|
||||||
|
Command* command = InitiateConnectionCommandFactory::createInitiateConnectionCommand(cuid, req, this, e);
|
||||||
|
commands.push_front(command);
|
||||||
|
e->addCommand(commands);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RequestGroup::validateFilename(const string& expectedFilename,
|
void RequestGroup::validateFilename(const string& expectedFilename,
|
||||||
|
|
|
@ -39,10 +39,12 @@
|
||||||
#include "SegmentMan.h"
|
#include "SegmentMan.h"
|
||||||
#include "LogFactory.h"
|
#include "LogFactory.h"
|
||||||
#include "Command.h"
|
#include "Command.h"
|
||||||
#include "ChunkChecksum.h"
|
|
||||||
#include "Checksum.h"
|
|
||||||
#include "SegmentManFactory.h"
|
#include "SegmentManFactory.h"
|
||||||
#include "DefaultSegmentManFactory.h"
|
#include "DefaultSegmentManFactory.h"
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
# include "ChunkChecksum.h"
|
||||||
|
# include "Checksum.h"
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
class DownloadCommand;
|
class DownloadCommand;
|
||||||
|
|
||||||
|
@ -61,8 +63,10 @@ private:
|
||||||
SegmentManFactoryHandle _segmentManFactory;
|
SegmentManFactoryHandle _segmentManFactory;
|
||||||
const Option* _option;
|
const Option* _option;
|
||||||
const Logger* logger;
|
const Logger* logger;
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
ChunkChecksumHandle _chunkChecksum;
|
ChunkChecksumHandle _chunkChecksum;
|
||||||
ChecksumHandle _checksum;
|
ChecksumHandle _checksum;
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
int32_t _numConcurrentCommand;
|
int32_t _numConcurrentCommand;
|
||||||
|
|
||||||
void validateFilename(const string& expectedFilename,
|
void validateFilename(const string& expectedFilename,
|
||||||
|
@ -85,8 +89,10 @@ public:
|
||||||
_segmentManFactory(new DefaultSegmentManFactory(option)),
|
_segmentManFactory(new DefaultSegmentManFactory(option)),
|
||||||
_option(option),
|
_option(option),
|
||||||
logger(LogFactory::getInstance()),
|
logger(LogFactory::getInstance()),
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
_chunkChecksum(0),
|
_chunkChecksum(0),
|
||||||
_checksum(0),
|
_checksum(0),
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
_numConcurrentCommand(0),
|
_numConcurrentCommand(0),
|
||||||
numConnection(0),
|
numConnection(0),
|
||||||
isTorrent(false) {}
|
isTorrent(false) {}
|
||||||
|
@ -98,7 +104,10 @@ public:
|
||||||
_segmentManFactory(new DefaultSegmentManFactory(option)),
|
_segmentManFactory(new DefaultSegmentManFactory(option)),
|
||||||
_option(option),
|
_option(option),
|
||||||
logger(LogFactory::getInstance()),
|
logger(LogFactory::getInstance()),
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
_chunkChecksum(0),
|
_chunkChecksum(0),
|
||||||
|
_checksum(0),
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
_numConcurrentCommand(0),
|
_numConcurrentCommand(0),
|
||||||
numConnection(0),
|
numConnection(0),
|
||||||
isTorrent(false)
|
isTorrent(false)
|
||||||
|
@ -126,6 +135,7 @@ public:
|
||||||
_uris.push_back(uri);
|
_uris.push_back(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
void setChunkChecksum(const ChunkChecksumHandle& chunkChecksum)
|
void setChunkChecksum(const ChunkChecksumHandle& chunkChecksum)
|
||||||
{
|
{
|
||||||
_chunkChecksum = chunkChecksum;
|
_chunkChecksum = chunkChecksum;
|
||||||
|
@ -136,6 +146,17 @@ public:
|
||||||
return _chunkChecksum;
|
return _chunkChecksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setChecksum(const ChecksumHandle& checksum)
|
||||||
|
{
|
||||||
|
_checksum = checksum;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChecksumHandle getChecksum() const
|
||||||
|
{
|
||||||
|
return _checksum;
|
||||||
|
}
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
void initBitfield();
|
void initBitfield();
|
||||||
|
|
||||||
void openExistingFile();
|
void openExistingFile();
|
||||||
|
@ -207,16 +228,6 @@ public:
|
||||||
|
|
||||||
bool downloadFinishedByFileLength();
|
bool downloadFinishedByFileLength();
|
||||||
|
|
||||||
void setChecksum(const ChecksumHandle& checksum)
|
|
||||||
{
|
|
||||||
_checksum = checksum;
|
|
||||||
}
|
|
||||||
|
|
||||||
ChecksumHandle getChecksum() const
|
|
||||||
{
|
|
||||||
return _checksum;
|
|
||||||
}
|
|
||||||
|
|
||||||
const string& getHintFilename() const
|
const string& getHintFilename() const
|
||||||
{
|
{
|
||||||
return _hintFilename;
|
return _hintFilename;
|
||||||
|
|
12
src/main.cc
12
src/main.cc
|
@ -187,6 +187,7 @@ void showUsage() {
|
||||||
" system but its corresponding .aria2 file doesn't\n"
|
" system but its corresponding .aria2 file doesn't\n"
|
||||||
" exist.\n"
|
" exist.\n"
|
||||||
" Default: false") << endl;
|
" Default: false") << endl;
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
cout << _(" --check-integrity=true|false Check file integrity by validating piece hash.\n"
|
cout << _(" --check-integrity=true|false Check file integrity by validating piece hash.\n"
|
||||||
" This option makes effect in BitTorrent download\n"
|
" This option makes effect in BitTorrent download\n"
|
||||||
" and Metalink with chunk checksums.\n"
|
" and Metalink with chunk checksums.\n"
|
||||||
|
@ -199,6 +200,7 @@ void showUsage() {
|
||||||
" a file in Metalink mode. This option makes effect\n"
|
" a file in Metalink mode. This option makes effect\n"
|
||||||
" in Metalink with chunk checksums.\n"
|
" in Metalink with chunk checksums.\n"
|
||||||
" Default: true") << endl;
|
" Default: true") << endl;
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
cout << _(" -c, --continue Continue downloading a partially downloaded\n"
|
cout << _(" -c, --continue Continue downloading a partially downloaded\n"
|
||||||
" file. Use this option to resume a download started\n"
|
" file. Use this option to resume a download started\n"
|
||||||
" by web browsers or another programs\n"
|
" by web browsers or another programs\n"
|
||||||
|
@ -403,8 +405,10 @@ int main(int argc, char* argv[]) {
|
||||||
{ "max-download-limit", required_argument, &lopt, 201 },
|
{ "max-download-limit", required_argument, &lopt, 201 },
|
||||||
{ "file-allocation", required_argument, 0, 'a' },
|
{ "file-allocation", required_argument, 0, 'a' },
|
||||||
{ "allow-overwrite", required_argument, &lopt, 202 },
|
{ "allow-overwrite", required_argument, &lopt, 202 },
|
||||||
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
{ "check-integrity", required_argument, &lopt, 203 },
|
{ "check-integrity", required_argument, &lopt, 203 },
|
||||||
{ "realtime-chunk-checksum", required_argument, &lopt, 204 },
|
{ "realtime-chunk-checksum", required_argument, &lopt, 204 },
|
||||||
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
{ "continue", no_argument, 0, 'c' },
|
{ "continue", no_argument, 0, 'c' },
|
||||||
{ "user-agent", required_argument, 0, 'U' },
|
{ "user-agent", required_argument, 0, 'U' },
|
||||||
{ "no-netrc", no_argument, 0, 'n' },
|
{ "no-netrc", no_argument, 0, 'n' },
|
||||||
|
@ -641,7 +645,13 @@ int main(int argc, char* argv[]) {
|
||||||
if(op->defined(PREF_HTTP_PROXY_USER)) {
|
if(op->defined(PREF_HTTP_PROXY_USER)) {
|
||||||
op->put(PREF_HTTP_PROXY_AUTH_ENABLED, V_TRUE);
|
op->put(PREF_HTTP_PROXY_AUTH_ENABLED, V_TRUE);
|
||||||
}
|
}
|
||||||
if(!op->defined(PREF_TORRENT_FILE) && !op->defined(PREF_METALINK_FILE) &&
|
if(
|
||||||
|
#ifdef ENABLE_BITTORRENT
|
||||||
|
!op->defined(PREF_TORRENT_FILE) &&
|
||||||
|
#endif // ENABLE_BITTORRENT
|
||||||
|
#ifdef ENABLE_METALINK
|
||||||
|
!op->defined(PREF_METALINK_FILE) &&
|
||||||
|
#endif // ENABLE_METALINK
|
||||||
!op->defined(PREF_INPUT_FILE)) {
|
!op->defined(PREF_INPUT_FILE)) {
|
||||||
if(optind == argc) {
|
if(optind == argc) {
|
||||||
cerr << _("specify at least one URL") << endl;
|
cerr << _("specify at least one URL") << endl;
|
||||||
|
|
|
@ -159,6 +159,8 @@ ENABLE_ASYNC_DNS_FALSE = @ENABLE_ASYNC_DNS_FALSE@
|
||||||
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
|
||||||
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
|
||||||
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_FALSE = @ENABLE_MESSAGE_DIGEST_FALSE@
|
||||||
|
ENABLE_MESSAGE_DIGEST_TRUE = @ENABLE_MESSAGE_DIGEST_TRUE@
|
||||||
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
|
||||||
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
ENABLE_METALINK_TRUE = @ENABLE_METALINK_TRUE@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
|
Loading…
Reference in New Issue