When there is not enough space in disk when writing a chunk of
data,
aria2 now prints the message to the console to warn user and
aborts
its download. Not all downloads are canceled because some
downloads
may use another disk or partition. BUG#1640332
* src/AbstractDiskWriter.cc
* src/PeerAbstractCommand.cc
* src/PeerAbstractCommand.h: Added onFailure() function for
override.
* src/PeerInteractionCommand.cc: In onFailure(), call
RequestGroup::
setHaltRequested(true) to cancel download.
* src/PeerInteractionCommand.h
Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the
type of
socket from int to sock_t as sockets are unsigned in Windows.
For AsyncNameResolver, DownloadEngine, I did additional
modification
for the portion of the code changed according to epoll support.
I defined sock_t in a2netcompat.h to use sock_t without
including
SocketCore.h.
* src/AsyncNameResolver.cc
* src/AsyncNameResolver.h
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/SocketCore.cc
* src/SocketCore.h
* src/a2netcompat.h
Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change,
all
changes in the patch were applied.
* test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
* test/DefaultPieceStorageTest.cc: Fixed unit test error in
MinGW.
* test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
a2io.h and common.h were modified.
* src/a2io.h: Changed seek/stat/tell calls to use 64 bit
versions in
MinGW.
* src/common.h: Changed off_t to 64 bit in MinGW.
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
only a2netcompat.h is modified.
* src/a2netcompat.h: Removed unused getaddrinfo related #define
directives.
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
only gai_strerror.h is modified.
* src/gai_strerror.h: Fixed gai_strerror() function to report
all
winsock errors in MinGW.
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
only the
follow sources are applied.
* src/Platform.h: I removed HAVE_WINSOCK2_H directive from
Platform.h.
* src/Platform.cc: Moved common setup/teardown code to Platform
class.
I moved #endif // HAVE_WINSOCK2_H to the front of #include
"DlAbortEx.h"
I included locale.h from Platform.cc.
* src/main.cc: Moved common setup/teardown code to Platform
class.
* test/AllTest.cc: Use Platform class.
Set locale to C in AllTest.cc to prevent the messages to be
localized.
Applied Ross's aria2-0.13.2+1-mingw-3.patch.
* test/HttpHeaderTest.cc: Casted to off_t where it should.
* test/HttpRequestTest.cc: Casted to off_t where it should.
Applied Ross's aria2-0.13.2+1-mingw.patch and
aria2-0.13.2+1-mingw-2.patch.
* src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for
the
systems which don't have termious.h. I moved the directive
inside of
if(isTTY) { ... clause so that line is wiped out without
termious.h.
I also removed HAVE_ASCTIME_R clause because asctime_r is
provided
anyway.
* src/asctime_r.h
* src/asctime_r.c: Added for the systems don't have asctime_r
function.
I added 2nd argument to the prototype declaration.
* src/StringFormat.cc: Get rid of vasprintf.
* src/getaddrinfo.h: Fixed constants.
* configure.ac: Added the check for asctime_r function.
* src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
Added writable test for Socket when the sending message is in
progress.
Usually the sending message is piece message. Without wriable
check,
upload latency is dropped to more than 1sec.
* src/PeerInteractionCommand.cc
Create only requested files and files which shares a piece with
requested file in multi-torrent downloads. Directory structures
are
also created in the same rule.
MultiDiskAdaptor::fileExists() now uses FileEntry instead of
DiskWriterEntry as in the previous implementation.
* src/MultiDiskWriter.cc
* src/MultiFileAllocationIterator.cc
* src/MultiFileAllocationIterator.h
* test/MultiFileAllocationIteratorTest.cc
Actively establish connection to peers in seeding, when peer
cache
is not full and max upload speed limit is not reached.
* src/ActivePeerConnectionCommand.cc
* src/ActivePeerConnectionCommand.h
Always remove a peer from cache in
DefaultPeerStorage::returnPeer(),
to make room more fleshy, recently found peers.
Peer::_badConditionStartTime is not used anymore. Consider to
remove
it.
* src/DefaultPeerStorage.cc
* test/DefaultPeerStorageTest.cc
Returns cached data only when the previous receiveHandshake() is
called
with peek = true.
* src/PeerConnection.cc (receiveHandshake)
* src/PeerConnection.h (receiveHandshake)
Changed default value of -s option from 1 to 5.
Also max value of -s option is changed from 5 to 16.
* src/HelpItemFactory.cc
* src/OptionHandlerFactory.cc
* src/option_processing.cc
* src/usage_text.h
Changed -s options behavior. Now it means the number of
connections
made simultaneously in each http/ftp download.
If 1 URL is specified, the behavior is the same with old
implementation.
If -s N is given and more than N URLs are specified, first N
URLs are
used and remaining URLs are used for backup. If less than N URLs
are
specified, some of URLs are used more than once so that totally
N
connections are made simultaneously.
* src/main.cc
* src/HttpHeaderProcessor.cc: Rewritten using std::string as a
buffer.
* src/HttpHeaderProcessor.h: Rewritten using std::string as a
buffer.
* src/HttpConnection.cc: Included missing sstream.
Limited the number files opened in each BitTorrent download. The
default
value is 100. The option to change this value will be added.
* src/MultiDiskAdaptor.cc
* src/MultiDiskAdaptor.h
* src/MultiFileAllocationIterator.cc
Drop connection if the incoming peer ID is the same with
localhost's
one. The previous implementation drops connection when incoming
peer's
IP address is the same with localhost's one.
* src/PeerListenCommand.cc
* src/DefaultBtInteractive.cc
Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker
request
attempt is failed, then 2nd attempt get kicked out more quickly.
And it is now static const member of DefaultBtAnnounce.
* src/DefaultBtAnnounce.h
Calculate piece hash when data is arrived if the data is arrived
in
order. This removes additional read operation for hash
calculation.
If the data is arrived in out of order, the hash is calucated
when the
piece is completed. This is the same behavior as the old
implementation.
* src/BtPieceMessage.cc
* src/DefaultBtProgressInfoFile.cc
* src/DefaultPieceStorage.cc
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/DownloadEngine.cc
* src/GrowSegment.cc
* src/GrowSegment.h
* src/Piece.cc
* src/Piece.h
* src/PiecedSegment.cc
* src/PiecedSegment.h
* src/Segment.h
* test/PieceTest.cc
Removed repeated call of getTopDirPath(). Instead, call it once
and
cache the result.
* src/MultiDiskAdaptor.cc
* src/MultiDiskAdaptor.h
(mkdir, openFile, initAndOpenFile, openExistingFile)
Fixed compile error on debian etch.
The libc6 shipped with debian etch doesn't define ULLONG_MAX
properly
even if _GNU_SOURCE is defined. So define ULLONG_MAX in case
when
it is undefined.
* src/Util.cc (ULLONG_MAX)
Added epoll support. Use epoll if it is available. If not, use
select.
When async dns is enabled in compile time, epoll support is
enabled
only when aria2 is built with c-ares. This condition statement
is
defined in a2io.h.
Currently aria2 supports both c-ares and ares, but ares is
maintained
for quite a while and debian already has c-ares package, ares
support
will be dropped in the future version.
* configure.ac
* src/AbstractCommand.cc
* src/AsyncNameResolver.cc
* src/AsyncNameResolver.h
* src/Command.cc
* src/Command.h
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/PeerAbstractCommand.cc
* src/SocketCore.cc
* src/SocketCore.h
* src/a2io.h
Do not do write operation to /dev/null file.
* src/LogFactory.cc
* src/SimpleLogger.cc
Replaced vasprintf with vsnprintf
* src/SimpleLogger.cc (SimpleLogger::writeLog)
Reduced the usage of gettimeofday().
* src/DefaultBtMessageDispatcher.cc
(DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
(class FindStaleRequestSlot, class ProcessStaleRequestSlot)
* src/RequestSlot.cc
* src/RequestSlot.h
(RequestSlot::isTimeout)
Made RequestSlot have a reference to Piece object to avoid find
Piece repeatedly.
* src/DefaultBtMessageDispatcher.cc
(class FindStaleRequestSlot, class ProcessStaleRequestSlot)
* src/RequestSlot.cc
* src/RequestSlot.h
(RequestSlot::getPiece)
* test/DefaultBtMessageDispatcherTest.cc