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
Fixed compile error on Mac OS X 10.3.9. This error was caused by
the
name collision of static variable and predefined macro.
* src/BtContext.cc
* src/BtContext.h
* src/CookieBoxFactory.cc
* src/CookieBoxFactory.h
* src/CookieParser.cc
* src/CookieParser.h
* src/DefaultBtContext.cc