Added direct I/O support. The current implementation uses O_DIRECT,
which is not posix standard and is tested on linux 2.6.21.
Currently only file allocation uses direct I/O.
* src/SingleFileAllocationIterator.{h, cc}
* test/SingleFileAllocationIteratorTest.cc
* src/MultiFileAllocationIterator.{h, cc}
* test/MultiFileAllocationIteratorTest.cc
* src/BinaryStream.h
* src/DiskWriter.h
* src/AbstractDiskWriter.{h, cc}
* src/ByteArrayDiskWriter.h
* src/DiskAdaptor.h
* src/AbstractSingleDiskAdaptor.{h, cc}
* src/MultiDiskAdaptor.{h, cc}
* src/FileAllocationEntry.cc
* src/Util.{h, cc}
* src/OptionHandlerFactory.cc
* src/prefs.h
* src/version_usage.cc
* src/option_processing.cc
Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
handleException.
* src/MultiFileAllocationIterator.cc
Added EINTR handling
* src/SocketCore.cc
Set Content-Type to SingleFileDownloadContext when http response
is
received.
* src/HttpResponseCommand.cc
* src/HttpResponse.{h, cc}
* test/HttpResponseTest.cc
Rewritten to add content-type support.
* src/DownloadHandler.{h, cc}
* src/BtPostDownloadHandler.{h, cc}
* test/BtPostDownloadHandlerTest.cc
* src/MetalinkPostDownloadHandler.{h, cc}
* test/MetalinkPostDownloadHandlerTest.cc
* src/PostDownloadHandler.{h, cc}
* src/DownloadHandlerConstants.{h, cc}
* src/RequestGroup.cc
* src/HttpResponseCommand.cc
* src/FtpNegotiationCommand.cc
* src/SingleFileDownloadContext.{h, cc}
* src/RequestGroup.h
* src/RequestGroupCriteria.h
* src/ContentTypeRequestGroupCriteria.h
Added 'mem' option value for --follow-metalink,
--follow-torrent.
If it is give, metalink/torrent file is not written to the disk,
but
just is kept in memory. Parsing is occurred on memory.
* src/MetalinkHelper.{h, cc}
* src/MetalinkProcessor.h
* src/Xml2MetalinkProcessor.{h, cc}
* test/Xml2MetalinkProcessorTest.cc
* src/DownloadHandlerFactory.{h, cc}
* test/DownloadHandlerFactoryTest.cc
* src/PreDownloadHandler.{h, cc}
* src/OptionHandlerFactory.cc
* src/DefaultBtContext.{h, cc}
* test/DefaultBtContextTest.cc
* src/version_usage.cc
* src/Metalink2RequestGroup.{h, cc}
* src/RequestGroup.{h, cc}
* src/a2functional.h
* test/a2functionalTest.cc
* src/MemoryBufferPreDownloadHandler.{h, cc}
* src/OptionHandlerImpl.h
* src/prefs.h
* src/Util.{h, cc}
* test/UtilTest.cc
Keep DownloadResult rather than RequestGroup after downloads to
reduce
memory usage.
* src/RequestGroupMan.{h, cc}
* src/DownloadEngine.cc
* src/BtDependency.{h, cc}: Changed the type of dependee from
WeakHandle to SharedHandle because WeakHandle could be null.
* src/RequestGroup.{h, cc}
* src/DownloadEngineFactory.cc
* src/DownloadResult.h
Set totalLength after download finished
* src/UnknownLengthPieceStorage.{h, cc}
Keep torrent file specified in metalink in memory.
* src/Metalink2RequestGroup.cc
* src/BtDependency.cc
* src/TrueRequestGroupCriteria.h
Fixed the bug: seekg is used where seekp should be used.
* src/ByteArrayDiskWriter.cc
* test/ByteArraydiskWriterTest.cc
Added the check to see whether ares_host_callback accepts
timeouts
with c-ares; only c-ares 1.5.0 or newer accepts it.
* src/NameResolver.{h, cc}
* m4/libcares.m4
* configure.ac: Set C++ for language choice.
Fixed: compilation fails without c-ares/ares
* src/DownloadEngine.cc (addCommand): Moved outside #ifdef
Generate http/ftp commands only when download is incomplete.
* src/BtFileAllocationEntry.cc (prepareForNextAction)
Corrected typo. Examples are removed since they are available in
man
page.
* src/version_usage.cc
Updated man page.
* doc/aria2c.1
* doc/aria2c.1.txt
* doc/makeman: Commented out sed command.
Throw DlAbortEx when a remote file is not found.
* src/HttpResponse.cc
* src/FtpNegotiationCommand.cc
* src/message.h
Overwrite an existing file if --allow-overwrite=true is given.
* src/RequestGroup.cc
Removed unused functions
* src/AbstractCommand.h
Trim announce URL
* src/DefaultBtContext.cc
* test/ShaVisitorTest.cc
Trim argument s. Give trimed s to exception constructor.
* src/Util.cc (parseInt)(parseLLInt)
* test/UtilTest.cc
Preallocate non-requested file which is adjacent forward to
requested
file('requested' files means the files given in --select-file
option)
if they share a same piece.
This fixes long pause in the file system which doesn't support
sparse
files like FAT32 while downloading.
* src/MultiFileAllocationIterator.{h, cc}
* test/MultiFileAllocationIteratorTest.cc
* src/FileEntry.{h, cc}
Removed unused _option.
* src/MultiDiskAdaptor.h
* test/MultiDiskAdaptorTest.cc
* src/DefaultPieceStorage.cc
Set the default value of --seed-ratio to 1.0.
If 0.0 is given, then seeding continues regardless of share
ratio.
* src/version_usage.cc
* src/option_processing.cc
* src/BtSetup.cc
* doc/aria2c.1.txt
* doc/aria2c.1
Fixed: Selective download is not working in BitTorrent
* src/RequestGroup.cc
Introduced Sequence class. Use this instead of
Util::unfoldRange()
* src/PieceStorage.h
* test/MockPieceStorage.h
* src/UnknownLengthPieceStorage.h
* src/DefaultPieceStorage.{h, cc}
* src/Metalink2RequestGroup.cc
* src/RequestGroup.cc
* src/Sequence.h
* test/SequenceTest.cc
* src/IntSequence.h
* src/message.h
* src/Util.{h, cc}
* test/UtilTest.cc
Added new function 'parse' to catch exception thrown by
subclass's
parseArg
* src/OptionHandler.h
* src/OptionParser.cc
* src/NameMatchOptionHandler.h
* src/OptionHandlerImpl.h
* test/OptionHandlerTest.cc
Added IntegerRangeOptionHandler. Used for --listen-port and
--select-file. Now --listen-port accepts range of port.
* src/OptionHandlerFactory.cc
* src/version_usage.cc
* src/OptionHandlerImpl.h
* src/option_processing.cc
* src/BtSetup.cc
* src/PeerListenCommand.{h, cc}
* doc/aria2c.1.txt
* doc/aria2c.1
Implemented operator< for Exception class to provide easy way to
print
exception stack trace.
* src/Exception.{h, cc}
* src/main.cc
* src/option_processing.cc
* src/version_usage.cc
(showVersion): Reworked.
(showUsage): Added examples.
Removed Hint for total length and file name.
* src/Metalink2RequestGroup.cc
* src/RequestGroup.{h, cc}
* src/HttpResponseCommand.cc
* src/FtpNegotiationCommand.cc
Now --follow-torrent and --follow-metalink option work properly.
* src/RequestGroup.cc
Updated man page
* doc/aria2c.1.txt
* doc/aria2c.1
Added the ability to detect duplicate download entry which is
about to
download the same file other RequestGroup is downloading.
* src/RequestGroup.cc
* src/HttpResponseCommand.cc
* src/FtpNegotiationCommand.cc
Recalculates download progress when loading a control file,
if the piece length of DownloadContext is different from the one
saved
in the control file. Currently in-flight pieces are ignored.
* src/DefaultBtProgressInfoFile.cc
* test/DefaultBtProgressInfoFileTest.cc
* src/Util.{h, cc}
* test/UtilTest.cc
Do not rotate tiers in announce-list.
* src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
AnnounceList::allTiersFailed() used instead to detect whether
all
tiers are tried and failed.
* test/DefaultBtAnnounceTest.cc
* src/AnnounceList.{h, cc}: If all tiers are tried and failed
then
allTiersFailed() returns true. To reset tier pointer, call
resetTier();
* test/AnnounceListTest.cc
* src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx
catch
clause. Catch RecoverableException instead of DlRetryEx instead.
Implemented checksum validation feature(1 checksum for each
file)
The validation takes place after the download.
* src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
* src/IteratableChecksumValidator.{h, cc}: Rewritten.
* src/CheckIntegrityCommand.cc: Changed log message.
* src/Metalink2RequestGroup.cc: Set checksum to
SingleFileDownloadContext.
* src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
PieceHashCheckIntegrity class.
* src/BtCheckIntegrityEntry.{h, cc}: Now derived from
PieceHashCheckIntegrity class.
* src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
* src/IteratableValidator.h: New class.
* src/message.h
* src/CheckIntegrityEntry.{h, cc}
* src/IteratableChunkChecksumValidator.{h, cc}
* src/SingleFileDownloadContext.h
* src/DownloadCommand.cc
--allow-overwrite=true is no longer needed to check file
integrity
before download in BitTorrent download.
* src/RequestGroup.cc (getInitialCommand)
Removed RequestGroup from queue when
RequestGroup::getInitialCommand()
throws exception.
* src/RequestGroupMan.cc (getInitialCommands)
urlencode the given url inside Request::parseUrl(...)
* src/Request.{h, cc}
* src/Util.{h, cc}
* test/RequestTest.cc
Removed #!metalink3! notation support because it is deleted from
the metalink specification.
* src/Request.{h, cc}
* test/RequestTest.cc
Changed CheckIntegrityEntry interface so that it can define
the action when all the chunk checksums are valid.
* src/CheckIntegrityEntry.h
* src/StreamCheckIntegrityEntry.{h, cc}
* src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the
checksums
are valid, then aira2 goes to seeding mode. Sometimes it is
better
to exit rather than doing seeding. So, it would be good to
toggle this
behavior.
* src/CheckIntegrityCommand.cc
* src/AbstractCommand.cc
* src/RequestGroup.cc
Reflect the download length of in-flight pieces.
It makes the download length readout more precise.
* src/DefaultPieceStorage.{h, cc}
* test/DefaultPieceStorageTest.cc
* src/a2functional.h
* test/a2functionalTest.cc
Lower CPU load when --max-download-limit is used.
There is up and down in speed indicator when enabling
http-pipelining but a download goes well. I think the problem is
that
because http-pipelining is enabled, DownloadCommand is created
for
each segment and in its constructor, PeerStat::downloadStart()
is
called. In PeerStat::downloadStart(), speed calculation object
is
reseted, which makes download speed zero.
* src/DownloadCommand.cc
Rewritten using accumulate.
* src/RequestGroupMan.cc (calculateStat)
Code clearnup.
* src/FtpNegotiationCommand.cc
* src/HttpResponseCommand.cc
Now a file is stored in the directory specified in .metalnk file
(file[@name]).
* src/Metalink2RequestGroup.cc
Create the directory structure when opening the file if it
doesn't
exist.
* src/AbstractDiskWriter.cc
* src/Util.{h, cc}
* src/File.h
* test/UtilTest.cc
Removed file name comparison
* src/Metalink2RequestGroup.cc
* src/HttpResponseCommand.cc
Rewritten using Util::mkdirs()
* src/FileEntry.cc (setupDir)
* test/FileEntryTest.cc
Updated doc
* src/SingleFileDownloadContext.h
Now SleepCommand dispatches nextCommand when halt is requested.
It avoids a possible long wait after hitting CTRL-C.
* src/SleepCommand.{h, cc}
* src/RequestGroupAware.{h, cc}
Fixed: the listen port sent to the tracker is wrong. If aria2
fails
to open listen port, then remove the port number from the
tracker
request.
* src/DefaultBtAnnounce.cc
* test/DefaultBtAnnounceTest.cc
* test/MockPieceStorage.h
Inject randomizer to DefaultBtAnnounce and DefaultBtContext to
make
them more testable.
* src/DefaultBtAnnounce.{h, cc}
* src/DefaultBtContext.{h, cc}
* src/Util.{h, cc}
* test/DefaultBtAnnounceTest.cc
* test/DefaultBtContextTest.cc
* test/UtilTest.cc
Added 'B' to upload bytes readout.
* src/ConsoleStatCalc.cc
Now the listen port for BitTorrent download is opened when it is
needed.
* src/DownloadEngineFactory.cc
* src/BtSetup.{h, cc}
* src/PeerListenCommand.{h, cc}
Now an exception thrown while parsing tracker response is now
logged.
If DlAbortEx is catched, then btAnnounce->resetAnnounce()
immediately
called, which means no retry is made in this case, assuming a
tracker
has a problem.
* src/TrackerWatcherCommand.cc
Fixed: downloading a file whose length is unkown fails.
* src/DownloadCommand.cc
Simplified prepareForNextSegment()
* src/DownloadCommand.cc
Updated
* po/POTFILES.in
Re-implemented a file listing for Metalink, which was dropped
while
http/ftp/torrent integration was being implemented.
* src/MetalinkHelper.{h, cc}: New class.
* test/MetalinkHelperTest.cc
* src/main.cc
* src/Metalink2RequestGroup.cc
Added the ability to display the detailed torrent file
information.
Now -S option gives not only a file listing, but also total
download
length, info hash, announce URI, piece length, the number of
pieces,
and mode(single or multi-torrent).
* src/DefaultBtContext.{h, cc} (operator<<): New function.
* src/Util.cc (toStream): Show file length in a abbreviated
form(like
KiB)
* test/UtilTest.cc
* src/main.cc
Use RequestGroup::allDownloadFinished() to decide whether the
control
file should be removed or saved.
* src/RequestGroup.{h, cc} (allDownloadFinished): New function.
* src/RequestGroupMan.cc (removeStoppedGroup) (save)
Added the ability to recognize url-list in a torrent file.
The retrieved URLs are attached to the corresponding FileEntry.
* src/DefaultBtContext.{h, cc}
* src/FileEntry.{h, cc}
* test/DefaultBtContextTest.cc
* src/Piece.{h, cc}: Added SubPiece infrastructure to track down
the data smaller than block length.
A block length can be specified by constructor's argument.
* src/DefaultPieceStorage.{h, cc} (getMissingPiece):
Get a missing piece in the range of given FileEntry. This
function is
not used in the program yet.
* src/Util.h: Added some macros.