Get rid of AI_ADDRCONFIG when --disable-ipv6 opiton is given. It
causes name resolution error when none of network interface has
IPv4 address.
* src/main.cc
Added signal handler for SIGHUP to save .aria2 file when terminal
is closed. The handler is the same one for SIGINT and SIGTERM.
* src/MultiUrlRequestInfo.cc
Defined method name in XmlRpcMethod subclasses.
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Added tellStopped XML-RPC method. This method returns stopped
download in the specified range. It takes same parameters with
tellWaiting XML-RPC method. offset = 0 means the oldest download.
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
Use AI_ADDRCONFIG flag if it is available. Refactored so that
getaddrinfo calls are not scattered around. Unset AI_ADDRCONFIG
when conducting unit tests because they fail if networking
interface is not configured with IPv4 address.
* src/NameResolver.cc
* src/SocketCore.cc
* src/SocketCore.h
* src/a2netcompat.h
* test/AllTest.cc
Added --bt-save-metadata option. When true is given, it saves
metadata as .torrent file. This option has effect only when
BitTorrent Magnet URI is used. The filename is name in metadata
with suffix .torrent. The directory to be saved is the same
directory where download file is saved. If the same file already
exists, metdata is not saved.
* src/OptionHandlerFactory.cc
* src/UTMetadataPostDownloadHandler.cc
* src/UTMetadataPostDownloadHandler.h
* src/message.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/UTMetadataDataExtensionMessageTest.cc
Added changePosition XML-RPC method. It takes 3 parameters: gid,
pos and how. This method changes the position of download denoted
by gid. If how is POS_SET, it moves the download to a position
relative to the beginning of the queue. If how is POS_CUR, it
moves the download to a position relative to the current
position. If how is POS_END, it moves the download to a position
relative to the end of the queue. If the destination position is
less than 0 or beyond the end of the queue, it moves the download
to the beginning or the end of the queue respectively. Returns
the destination position.
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/RequestGroupManTest.cc
* test/XmlRpcMethodTest.cc
Added getOption and getGlobalOption XML-RPC method. getOption
takes GID as a parameter and returns its options as struct.
getGlobalOption takes no parameter and returns global
options. Because global option is used as a template for the
option of newly added downloads, it includes options returned by
getOption.
* src/Option.h
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
Sort _optionHandlers in OptionParser by name in ascending order.
Use vector instead of deque for efficiency.
* src/OptionHandler.h
* src/OptionHandlerFactory.h
* src/OptionParser.cc
* src/OptionParser.h
* src/version_usage.cc
* test/OptionParserTest.cc
Added following 2 keys, followedBy and belongsTo, to the response
of tellStatus.
followedBy: List of GIDs which are generated by the consequence of
this download. For example, when aria2 downloaded Metalink file,
it generates downloads described in it(see *--follow-metalink*
option). This value is useful to track these auto generated
downloads. If there is no such downloads, this key will not be
included in the response.
belongsTo: GID of a parent download. Some downloads are a part of
another download. For example, if a file in Metalink has
BitTorrent resource, the download of .torrent is a part of that
file. If this download has no parent, this key will not be
included in the response.
* src/BtPostDownloadHandler.cc
* src/DownloadResult.h
* src/Metalink2RequestGroup.cc
* src/MetalinkPostDownloadHandler.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/UTMetadataPostDownloadHandler.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
Fixed the bug that if --without-sqlite3 is given, pkg-config is
not properly used in configure script and failed to detect gnutls.
This is because explicit call of PKG_PROG_PKG_CONFIG is missing
and the initialization of pkg-config is done in first occurrence
of PKG_CHECK_MODULES which is not executed because it is inside of
sqlite3.m4. Added explicit PKG_PROG_PKG_CONFIG call.
* configure.ac
Fixed the bug that RequestGroupMan::downloadFinished() returns
true even if all downloads haven't finished, especially when
PostDownloadHandler is involved. Changed the condition so that it
only returns true if both _requestGroups and _reservedGroups are
empty.
* src/RequestGroupMan.cc