Nils Maier
093ea1de44
Fix bogus virtual override in StreamFilters
2013-07-05 20:15:55 +02:00
Nils Maier
d4044306f3
AppleTLS: Fix MessageDigestImpl
2013-07-05 20:14:49 +02:00
Nils Maier
59ba3c99f6
AppleTLS: Fix session CFRelease stuff
2013-07-05 02:00:21 +02:00
Tatsuhiro Tsujikawa
c6a733378f
Use std::unique_ptr to receive BtMessage
2013-07-04 22:35:41 +09:00
Tatsuhiro Tsujikawa
0cdeaa8177
Return nullptr directly where std::shared_ptr is expected
...
The constructor of std::shared_ptr which takes nullptr is not explicit
so we can return nullptr directly.
2013-07-04 21:44:09 +09:00
Tatsuhiro Tsujikawa
107de58997
Return nullptr directly where std::unique_ptr is expected
...
The constructor of std::unique_ptr which takes nullptr is not explicit
so we can return nullptr directly.
2013-07-04 21:33:36 +09:00
Tatsuhiro Tsujikawa
6ba1725e0f
Use std::unique_ptr for ARC4Encryptor in PeerConnection and MSEHandshake
2013-07-04 21:13:14 +09:00
Tatsuhiro Tsujikawa
b4ae039702
BinExpr, UnExpr: Make copies of args so that we can use them with rvalues
2013-07-04 03:04:50 +09:00
Tatsuhiro Tsujikawa
05d75ed218
Fix array version make_unique is invoked for 1 size_t arg accidentally
2013-07-04 03:02:33 +09:00
Tatsuhiro Tsujikawa
bc6aa3073b
Use std::unique_ptr for StreamPieceSelector instead of std::shared_ptr
2013-07-04 01:41:12 +09:00
Tatsuhiro Tsujikawa
128783cf86
Use std::unique_ptr for PieceSelector instead of std::shared_ptr
2013-07-04 01:38:24 +09:00
Tatsuhiro Tsujikawa
a479473949
Use std::unique_ptr for URISelector instead of std::shared_ptr
2013-07-04 01:16:48 +09:00
Tatsuhiro Tsujikawa
c36370ef60
Use std::unique_ptr for LpdMessage instead of std::shared_ptr
2013-07-04 00:56:29 +09:00
Tatsuhiro Tsujikawa
57f1902ee1
Use std::unique_ptr for StreamFilter instead of std::shared_ptr
2013-07-04 00:39:11 +09:00
Tatsuhiro Tsujikawa
cb205a207c
Use std::unique_ptr for HttpRequest instead of std::shared_ptr
2013-07-04 00:13:15 +09:00
Tatsuhiro Tsujikawa
9a38c102dc
Use std::unique_ptr for HttpResponse instead of std::shared_ptr
2013-07-03 23:42:55 +09:00
Tatsuhiro Tsujikawa
7e6db8d801
Use std::unique_ptr instead of array_ptr
2013-07-03 23:23:22 +09:00
Tatsuhiro Tsujikawa
c2e62cdb81
Fix compile error with i686-w64-mingw32-g++ 4.6
...
Which does not support constructor delegate
2013-07-03 23:21:47 +09:00
Tatsuhiro Tsujikawa
211f685add
BitfieldMan: Rewrite getCompletedLength and countMissingBlockNow
...
Rewritten so that no memory allocation is required for these
functions.
2013-07-03 22:40:28 +09:00
Tatsuhiro Tsujikawa
0d85fb0df3
Use std::unique_ptr for AsyncResolverMan
2013-07-03 01:30:01 +09:00
Tatsuhiro Tsujikawa
74d6d64271
Use std::unique_ptr for MessageDigest
2013-07-03 01:13:13 +09:00
Tatsuhiro Tsujikawa
f2d85c38cc
Fix segmentaion fault
2013-07-03 00:02:27 +09:00
Tatsuhiro Tsujikawa
f022402dc9
Use std::unique_ptr in DHTRegistry
2013-07-02 23:52:40 +09:00
Tatsuhiro Tsujikawa
1a5d75e819
Use std::unique_ptr to store DHTMessages instead of std::shared_ptr
2013-07-02 22:58:20 +09:00
Tatsuhiro Tsujikawa
4f7d1c395b
Use std::unique_ptr for ProgressUpdate instead of raw pointer
2013-07-01 21:59:54 +09:00
Tatsuhiro Tsujikawa
529b9fdceb
Use std::unique_ptr for ExtensionMessage
2013-07-01 21:42:51 +09:00
Tatsuhiro Tsujikawa
9e35750bb8
Code cleanup
2013-06-30 22:59:07 +09:00
Tatsuhiro Tsujikawa
098f1571be
Wrap BtMessage objects by std::unique_ptr instead of std::shared_ptr
2013-06-30 22:55:43 +09:00
Tatsuhiro Tsujikawa
abcb0745ed
Fix unitest compile error
2013-06-30 01:03:39 +09:00
Tatsuhiro Tsujikawa
03ae308faa
Use RequestSlot as pointer to avoid copying
2013-06-30 00:31:50 +09:00
Tatsuhiro Tsujikawa
d128a39fb6
HttpServer: Return bool for receiveHeader, use std::unique_ptr for headers
2013-06-29 23:20:43 +09:00
Tatsuhiro Tsujikawa
6a3e26a34d
Remove accidentally added const
2013-06-29 23:11:14 +09:00
Tatsuhiro Tsujikawa
5a223115e0
Rewrite CookieStorage
2013-06-29 23:09:09 +09:00
Tatsuhiro Tsujikawa
0b1e05b13b
Fix compile error
2013-06-27 00:20:48 +09:00
Tatsuhiro Tsujikawa
da7400ef5c
Return std::unique_ptr member as const ref
...
Returning raw pointer has a risk that it may be stolen by
std::shared_ptr in accident.
2013-06-26 23:56:43 +09:00
Tatsuhiro Tsujikawa
47402c5f29
Refactor HttpConnection and its neighbor objects
2013-06-26 23:19:15 +09:00
Tatsuhiro Tsujikawa
d485c8e767
Rewrite AuthConfig objects using std::unique_ptr
2013-06-26 21:45:29 +09:00
Tatsuhiro Tsujikawa
a4cf50914d
HttpRequest: Use raw non-owning pointer for cookieStorage_
2013-06-25 23:01:00 +09:00
Tatsuhiro Tsujikawa
4803482a51
HttpRequest: Store non-owning raw pointer for authConfigFactory_
2013-06-25 22:06:29 +09:00
Tatsuhiro Tsujikawa
6bcf33a69e
Fix compile error with clang
2013-06-25 02:57:48 +09:00
Tatsuhiro Tsujikawa
2761301dfb
Rewrite util::divide
2013-06-25 00:07:15 +09:00
Tatsuhiro Tsujikawa
2f6eff3821
download_helper: Cleanup
2013-06-24 23:49:49 +09:00
Tatsuhiro Tsujikawa
b364c2436b
toUpper, toLower: Let compiler copy src
2013-06-24 23:23:34 +09:00
Tatsuhiro Tsujikawa
10cdc59297
Remove vbegin and vend in favor of std::begin and std::end
2013-06-24 21:46:42 +09:00
Tatsuhiro Tsujikawa
d2ec57057e
HttpServer: Use std::unique_ptr for lastBody_ and headerProcessor_
2013-06-23 23:44:38 +09:00
Tatsuhiro Tsujikawa
fba7e7ee8b
Use move to send string data into SocketBuffer::pushStr
2013-06-23 23:31:07 +09:00
Tatsuhiro Tsujikawa
508109edbb
SocketBuffer: Use std::unique_ptr to store BufEntry
2013-06-23 23:06:12 +09:00
Tatsuhiro Tsujikawa
c0b60eb087
Use std::unique_ptr for UnionSeedCriteria
2013-06-23 22:07:25 +09:00
Tatsuhiro Tsujikawa
fa9f3fb5a3
Wrap Command object in std::unique_ptr
2013-06-23 21:55:52 +09:00
Tatsuhiro Tsujikawa
bb5b7eeedb
Move RequestGroup vector from Context to RequestGroupMan
2013-06-23 16:35:14 +09:00
Tatsuhiro Tsujikawa
28c84148e4
Pass std::unique_ptr by value
2013-06-23 16:24:47 +09:00
Tatsuhiro Tsujikawa
23086b6e21
AbstractBtMessage: Use std::unique_ptr for validator
2013-06-23 16:12:19 +09:00
Tatsuhiro Tsujikawa
a18bba7c66
DefaultBtMessageReceiver: Use raw pointer for non-owning object
2013-06-23 12:29:18 +09:00
Tatsuhiro Tsujikawa
85f5134626
DefaultBtMessageDispatcher: Use raw pointers for non-owning objects
2013-06-23 12:25:58 +09:00
Tatsuhiro Tsujikawa
9db01bed71
DefaultBtAnnounce: Use non-owning raw pointer for downloadContext_
2013-06-23 12:14:17 +09:00
Tatsuhiro Tsujikawa
bfb732c5d4
DefaultBtRequestFactory: Use raw pointer for pieceStorage_
2013-06-23 12:02:36 +09:00
Tatsuhiro Tsujikawa
bef6236da8
DownloadContext::attrs_ now holds std::unique_ptr
...
DownloadContext::getAttribute() returns a raw pointer.
2013-06-23 00:59:55 +09:00
Tatsuhiro Tsujikawa
1a299c4d7c
Use raw pointers to PieceStorage, PeerStorage and DownloadContxt for BtMessages
2013-06-23 00:01:40 +09:00
Tatsuhiro Tsujikawa
09c597fbb8
ParameterOptionHandler: Use initializer lists for params
2013-06-22 23:19:54 +09:00
Tatsuhiro Tsujikawa
286bb2840e
Remove Triplet, use std::tuple instead
2013-06-22 21:08:50 +09:00
Tatsuhiro Tsujikawa
5cb7ae0b86
Use std::unique_ptr in SingletonHolder
2013-06-22 19:36:42 +09:00
Tatsuhiro Tsujikawa
ca329a7ccb
Use std::mem_fn instead of std::mem_fun
2013-06-22 19:15:57 +09:00
Tatsuhiro Tsujikawa
38d4574355
Remove forEachMemFunSH in favor of for loop with auto
2013-06-22 19:04:52 +09:00
Tatsuhiro Tsujikawa
05d85e2965
Remove auto_delete in favor of std::unique_ptr
2013-06-22 18:51:29 +09:00
Tatsuhiro Tsujikawa
e791eb9ca3
Cleanup a2functional.h
...
Remove mem_fun_sh in favor of std::mem_fun. Remove unused functions.
Use std::mem_fn instead of mem_fun_sh
2013-06-22 17:53:39 +09:00
Tatsuhiro Tsujikawa
50dcd6394c
Use std::unique_ptr instead of std::shared_ptr
2013-06-22 15:49:41 +09:00
Tatsuhiro Tsujikawa
c330ac901d
Fix mingw32 compile error
2013-06-22 01:23:08 +09:00
Tatsuhiro Tsujikawa
07d270c87e
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
126a4bde61
Rewrite URI path component normalization
2013-06-19 00:15:37 +09:00
Tatsuhiro Tsujikawa
f022444d81
Join URI on redirect
2013-06-18 00:15:23 +09:00
Tatsuhiro Tsujikawa
4a106e7fcf
Send HAVE message to the peer which the piece is downloaded from
...
Historically, aria2 did not send HAVE message to the peer which the
piece is coming from, thinking it is obvious that the peer knows we
have the piece. But it is not obvious if one piece is download from
more than 1 peers (e.g., end game mode). So it is better to send HAVE
to all peers connected.
2013-06-13 21:42:33 +09:00
Tatsuhiro Tsujikawa
e3506b04fb
Revert 9eea959
only the parts which affect src/BtPieceMessage.cc
...
This is because we are not sure that peer has a piece just sending off
its block. It should be notified by the peer.
2013-06-13 21:34:08 +09:00
Tatsuhiro Tsujikawa
9eea959455
Improve peer bitfield and piece stat update
...
On HAVE message reception and PIECE message transmission, update peer
bitfield and piece stat only if current peer bitfield indicates it
does not have the piece.
2013-06-12 23:21:18 +09:00
Tatsuhiro Tsujikawa
4ff6a9f1d4
Do the same doc improvements to --follow-metalink
2013-06-12 21:37:30 +09:00
gt
75d3e6f4dd
Improvements to --follow-torrent=false documentation.
2013-06-11 23:49:09 +05:30
Tatsuhiro Tsujikawa
81e6b68443
Pass A2Gid by value, since it is uint64_t
2013-06-12 00:09:42 +09:00
Nils Maier
3b32dcb9f1
SessionSerializer: Truly unique URIs
...
Before, only spent uris where sanitized not to be contained within
remaining uris. Change this so that each uri in the
union(remaining,spent) get saved once at most.
The order of the uris will won't be changed, with remaining uris going
first followed by spent uris.
Also avoid copying the uri std::strings around during dupe checking,
usually resulting in better performance regarding CPU and space.
2013-06-10 00:58:28 +02:00
Tatsuhiro Tsujikawa
d444a6cc9e
Make getOption RPC method return option for stopped downloads
2013-05-28 22:55:09 +09:00
Tatsuhiro Tsujikawa
fde376efbc
SessionSerializer: Save spent URIs as well as remaining ones
2013-05-28 21:44:17 +09:00
Tatsuhiro Tsujikawa
e4bf9b9cc5
Implement DownloadResultDH::getOption()/getOptions()
2013-05-27 21:45:33 +09:00
Tatsuhiro Tsujikawa
3616b75e8a
Fix redeclaration warning on opensolaris
2013-05-26 16:15:57 +09:00
Tatsuhiro Tsujikawa
ce9eec5cb2
Include winsock2.h before windows.h
2013-05-25 23:28:28 +09:00
Tatsuhiro Tsujikawa
e760b3bd6e
Fix compiler warning with openssl
2013-05-25 23:27:56 +09:00
Tatsuhiro Tsujikawa
84769bce57
Fix compile error without message digest support
2013-05-25 22:38:57 +09:00
Tatsuhiro Tsujikawa
bc3b162569
Remove open_ member from BufferedFile and GZipFile
...
Just checking fp_ is sufficient.
2013-05-23 23:28:08 +09:00
Tatsuhiro Tsujikawa
b0799b6e46
Introduce IOFile abstract class to refactor BufferedFile and GZipFile
...
IOFile provides the same interface of old BufferedFile. It provides
extension points as pure virtual functions. Those functions are
implemented by 2 concrete subclasses: BufferedFile and GZipFile.
2013-05-23 23:12:32 +09:00
Tatsuhiro Tsujikawa
6c0fa43fa5
Update doc
2013-05-23 21:18:54 +09:00
Tatsuhiro Tsujikawa
db1106101d
Fix compile error without bittorrent support
2013-05-23 00:46:08 +09:00
Tatsuhiro Tsujikawa
b9436e4d12
Fix uninitialized values
2013-05-23 00:45:50 +09:00
Tatsuhiro Tsujikawa
b7a3976456
Fix position of parenthesis
2013-05-23 00:43:37 +09:00
Nils Maier
e25c0955c5
Fix invalid reference return in IndexedListIterator
2013-05-19 18:02:44 +02:00
Tatsuhiro Tsujikawa
2ed68f7ea3
Don't install aria2.h when libaria2 is disabled
2013-05-18 19:36:25 +09:00
Tatsuhiro Tsujikawa
93db904e48
Add reference marker to EXIT STATUS section
2013-05-18 16:37:58 +09:00
Tatsuhiro Tsujikawa
a4b29ac2f7
Add getGlobalStat API
2013-05-18 15:41:40 +09:00
Tatsuhiro Tsujikawa
c688f51f2e
Don't return hidden option from DownloadHandle::getOption and getGlobalOption
2013-05-17 23:06:34 +09:00
Tatsuhiro Tsujikawa
45506573a8
Rename KeyVals DownloadHandle::getOption() as getOptions
2013-05-17 23:00:37 +09:00
Tatsuhiro Tsujikawa
06377d77c9
Add changeGlobalOption, getGlobalOption, getGlobalOptions API
2013-05-17 22:56:21 +09:00
Tatsuhiro Tsujikawa
7ac096c3c0
Merge branch 'signals-again' of https://github.com/nmaier/aria2 into nmaier-signals-again
2013-05-17 21:19:42 +09:00
Nils Maier
b7ef53b13d
OSX (now) needs signal.h for sigaction
2013-05-17 01:48:53 +02:00
Nils Maier
51ddcaf5b1
AppleTLS: Properly support Snow Leopard (10.6)
...
Tested on 10.6.8 + XCode 4.2 (llvm-gcc-4.2, clang)
2013-05-17 01:42:01 +02:00
Tatsuhiro Tsujikawa
c7c4d46672
Add changeOption and DownloadHandle::getOption API
...
In aria2c.rst, define section label for "Input File" section so that
it can be referenced from other document.
2013-05-16 23:09:19 +09:00
Tatsuhiro Tsujikawa
8e8fb9ee36
Add addTorrent API
2013-05-15 23:29:28 +09:00
Tatsuhiro Tsujikawa
a8ef703b89
Update doc
2013-05-15 22:58:55 +09:00
Tatsuhiro Tsujikawa
a4a4a10490
Remove NULL check for pref because pref is always non NULL
2013-05-15 22:51:35 +09:00
Tatsuhiro Tsujikawa
fc0982587b
Release elements in routineCommands_ on destruction
2013-05-15 22:50:51 +09:00
Tatsuhiro Tsujikawa
cef6db17ba
Add changePosition API
2013-05-15 00:50:55 +09:00
Tatsuhiro Tsujikawa
4f5d26a0c7
Use BtFileMode for TorrentAttribute::mode
2013-05-15 00:09:51 +09:00
Tatsuhiro Tsujikawa
5dcc2b7842
Add DownloadHandle::getBtMetaInfo() API
2013-05-14 23:00:21 +09:00
Tatsuhiro Tsujikawa
b0b5e0df38
Enable multicast loopback in Bt LPD
2013-05-14 21:45:27 +09:00
Tatsuhiro Tsujikawa
e350df2d75
Add download event callback API and its example
2013-05-11 19:40:24 +09:00
Tatsuhiro Tsujikawa
1c571f196a
Refactor Notifier interface to accept DownloadEventListener interface
...
WebSocketSessionMan now implements DownloadEventListener and is added
to Notifier. It becomes member variable of DownloadEngine. The event
constant for download event is defined in aria2.h so that we can add
event callback API later.
2013-05-11 18:50:03 +09:00
Tatsuhiro Tsujikawa
9f4f888e39
Make DownloadHandle::getNumPieces() return int
2013-05-10 21:52:46 +09:00
Tatsuhiro Tsujikawa
1a953d5f93
Add DownloadHandle::getInfohash() and getPieceLength()
2013-05-10 21:51:41 +09:00
Tatsuhiro Tsujikawa
1b6827b060
Revert d50021d045
...
It is safe to use prealloc for default, because of legacy fs (e.g.,
vfat) usage in Android.
2013-05-10 21:14:03 +09:00
Tatsuhiro Tsujikawa
c056f747c6
Install libaria2.pc only when libaria2 is enabled
2013-05-10 21:12:30 +09:00
Tatsuhiro Tsujikawa
233501f768
Enable TLS1.1 with gnutls build
2013-05-10 00:49:06 +09:00
Tatsuhiro Tsujikawa
fb31e44d60
Change error code -1 to just negative error code
2013-05-10 00:08:36 +09:00
Tatsuhiro Tsujikawa
16635f94ea
Make DownloadHandle class
2013-05-10 00:00:36 +09:00
Tatsuhiro Tsujikawa
ca6b46db84
Generate libaria2 API doc from aria2.h
2013-05-09 23:49:30 +09:00
Tatsuhiro Tsujikawa
8940d2aafd
Change the way to receive resulting gids in addUri, addMetalink
2013-05-09 21:28:24 +09:00
Tatsuhiro Tsujikawa
b733431ac4
Add DownloadHandle::getNumFiles and getFile API
2013-05-09 00:48:41 +09:00
Tatsuhiro Tsujikawa
d50021d045
Use trunc as default value for --file-allocation on Android build
2013-05-06 19:31:40 +09:00
Tatsuhiro Tsujikawa
4c139eb039
Add TAG_DEPRECATED in DeprecatedOptionHandler ctor
2013-05-06 19:24:13 +09:00
Tatsuhiro Tsujikawa
512f87f4ff
Fix compiler warning
2013-05-06 19:23:17 +09:00
Tatsuhiro Tsujikawa
5bc5665c6a
Support off64_t for Android build
...
Android NDK R8e does not provide ftruncate64, but bionic has the
assembler code to access kernel function. We borrowed those
ftruncate64.S files from android source code repository. It turns out
that x86 asm.h in NDK R8e is also broken, so latest asm.h was also
borrowed.
2013-05-06 19:12:17 +09:00
Tatsuhiro Tsujikawa
3a4acead2d
Reset global::globalHaltRequested to 0 in MultiUrlRequestInfo::prepare()
2013-05-05 17:47:14 +09:00
Tatsuhiro Tsujikawa
1b920e4011
Add --enable-libaria2 configure option
...
By default, libaria2 feature is disabled. Use --enable-libaria2
to enable it. libaria2 static build is also disabled by default.
Use --enable-static to enable it.
2013-05-05 00:37:11 +09:00
Tatsuhiro Tsujikawa
2bf2dba544
Merge branch 'libaria2'
2013-05-05 00:13:17 +09:00
Tatsuhiro Tsujikawa
22b3e0a4ae
Fix PREF_QUIET is set to A2_V_TRUE even if standalone is true
2013-05-05 00:05:41 +09:00
Tatsuhiro Tsujikawa
ebfc5f55e5
Add SessionConfig to store per Session config
...
sessionConfigSetKeepRunning() was removed and SessionConfig has
keepRunning member instead. Signal handlers are now all prepared in
MultiUrlRequestGroup object. Setting SessionConfig.useSignalHandler to
false will avoid signal handler setup.
2013-05-04 23:56:19 +09:00
Tatsuhiro Tsujikawa
4410f0e56c
Treat response is completed if EOF is received before streamFilter completes
2013-05-04 22:44:08 +09:00
Tatsuhiro Tsujikawa
7d55341fde
Fix event polling not working with no downloads but keepRunning_ is true
2013-05-02 12:44:55 +09:00
Tatsuhiro Tsujikawa
98b132b4d1
Receive reference, not copy
2013-05-02 11:47:29 +09:00
Tatsuhiro Tsujikawa
d07b3ff8d9
Suppress console output for none-standalone mode
2013-05-02 11:30:42 +09:00
Tatsuhiro Tsujikawa
315c05ea3c
Suppress console log output for library use, enclose Platform in try-catch
...
Still need to suppress global::cerr and global::cout
2013-05-02 10:25:28 +09:00
Tatsuhiro Tsujikawa
f5d5d8fa8e
Fix empty unknown option name in OptionParser::parse
2013-05-02 10:19:30 +09:00
Tatsuhiro Tsujikawa
43895155e0
Don't enter daemon mode if standalone is false
2013-05-02 10:08:47 +09:00
Tatsuhiro Tsujikawa
aee621b3d4
Don't exit on error in option_processing
...
Still it exits when -v or -h is given. They are now guarded by
standalone variable and only do so when it is true.
2013-05-02 10:03:00 +09:00
Tatsuhiro Tsujikawa
e5cccd335c
Add addMetalink API function
2013-05-02 09:40:27 +09:00
Tatsuhiro Tsujikawa
24a6896bf4
Add sessionConfigSetKeepRunning and shutdown API function
...
Setting sessionConfigSetKeepRunning to true makes aria2 core keep
running even if there is no download to perform, just like --enable-rpc
option.
2013-05-01 21:28:04 +09:00
Tatsuhiro Tsujikawa
a456d83de0
Update API doc
2013-05-01 17:15:43 +09:00
Tatsuhiro Tsujikawa
bbc8866cfb
Add removeDownload, pauseDownload and unpauseDownload API function
2013-05-01 16:58:34 +09:00
Tatsuhiro Tsujikawa
4c50544f1a
Rename DOWNLOAD_STATUS as DownloadStatus
2013-05-01 13:39:54 +09:00
Tatsuhiro Tsujikawa
2109ba23a8
Add DownloadHandle::getFiles() API function
2013-05-01 13:38:30 +09:00
Tatsuhiro Tsujikawa
5e64d4c9a9
Expose struct DownloadHandle interface to public API directly
2013-05-01 11:58:25 +09:00
Tatsuhiro Tsujikawa
8f659f49ec
Rename gidToString as gidToHex, add hexToGid and isNull
2013-04-30 22:51:05 +09:00
Tatsuhiro Tsujikawa
1df4adefb5
Add accessors for DownloadHandle
...
Added downloadGetBitfield, downloadGetNumPieces,
downloadGetConnections, downloadGetErrorCode,
downloadGetFollowedBy, downloadGetBelongsTo and
downloadGetDir functions.
2013-04-30 22:42:23 +09:00
Tatsuhiro Tsujikawa
d1252dcc5f
Move aria2api.{cc,h} to libaria2_la_SOURCES
2013-04-30 21:47:05 +09:00
Tatsuhiro Tsujikawa
db2e22132d
Merge branch 'libuv-eventpoll' of https://github.com/nmaier/aria2 into nmaier-libuv-eventpoll
2013-04-30 14:53:42 +09:00
Tatsuhiro Tsujikawa
549dd5b2a7
uitos: Fix off-by-one error bug
2013-04-29 23:53:23 +09:00
Nils Maier
a1a3e21f73
LibUV: Revert unrelated change
2013-04-28 21:54:35 +02:00
Nils Maier
e700ebd3e9
LibUV: Reorder event poll preference
...
*nix will keep epoll/kqueue/port as the default (when available), while
Windows, lacking all of these, will default to libuv (when available)
2013-04-28 21:44:06 +02:00
Nils Maier
6b7a51d5e0
Close GZipFiles in the d'tor
2013-04-28 21:32:51 +02:00
Tatsuhiro Tsujikawa
28849e3ddf
Add gidToString and getActiveDownload API functions
2013-04-27 01:26:59 +09:00
Tatsuhiro Tsujikawa
9734fa5447
Call onEndOfRun() on oneshot == true as well
2013-04-27 01:23:54 +09:00
Tatsuhiro Tsujikawa
0ef5f4eea1
Add getDownloadHandle API
2013-04-27 00:57:18 +09:00
Tatsuhiro Tsujikawa
6fcf274f27
Add initialization function and addUri API function for libaria2
2013-04-26 23:59:48 +09:00
Tatsuhiro Tsujikawa
90abec8a36
Move initialization code in aria2::main to struct Context
2013-04-25 21:46:31 +09:00
Tatsuhiro Tsujikawa
bbb978948d
Add preliminary libtool files for libaria2
2013-04-25 11:38:26 +09:00
Tatsuhiro Tsujikawa
b05454657f
Fix cached data is not flushed when downloaded data is less than 16KiB
2013-04-23 23:00:11 +09:00
Tatsuhiro Tsujikawa
9abbd5c917
Use INFO level log when get_associate failed in PortEventPoll::poll()
2013-04-20 21:03:38 +09:00
Nils Maier
539fda0b4f
LibUV: Code cleanup
2013-04-17 15:53:17 +02:00
Nils Maier
1cd5dcc9b6
LibUV: Correct event removal
2013-04-17 15:53:06 +02:00
Tatsuhiro Tsujikawa
8a431bfc89
Don't wait for AAAA query response if A query response has been received
...
If we got IPv4 lookup response, we don't wait for IPv6 lookup
response. This is because DNS server may drop AAAA query and we have
to wait for the long time before timeout. We don't do the inverse,
because, based on todays deployment of DNS server, almost all of them
can respond A query just fine.
2013-04-14 21:12:46 +09:00
Tatsuhiro Tsujikawa
5e245c3397
Fix compile error without SSL/TLS lib
2013-04-14 18:43:16 +09:00
Tatsuhiro Tsujikawa
2e39fd6273
Check configured addresses again if previous check found none of them
...
Currently, aria2 checks configured addresses at the startup. But there
are chances that interfaces are not setup at that moment. For example,
if aria2 is used as daemon, it may start before network interfaces
up. To workaround this, we check addresses again if both addresses are
not configured at the startup.
2013-04-13 21:16:53 +09:00
Tatsuhiro Tsujikawa
4070113ef0
Save options directly specified for download in --save-session
...
This change makes --save-session save only options specified for
download, more specifically, options in command-line, -i file and via
RPC. The other options from conf file and default values are not
saved. This will drastically decrease the size of session file.
2013-04-11 23:13:21 +09:00
Tatsuhiro Tsujikawa
07d38e31ad
Save URI returned only from FileEntry::getRemainingUris()
...
The currently used URIs are inserted back into remaining URI list in
FileEntry::putBackRequest(), which overlaps to some of the URIs in
spentUris_. If we save spent URIs, each time save is performed, the
number of URIs are increased due to this overlap. This change fixes
this bug.
2013-04-11 22:45:37 +09:00
Nils Maier
b874c7df11
AppleMD: Add destructors to make compilers happy
2013-04-10 08:51:57 +02:00
Nils Maier
9acd3df3cb
LibUV: Implement LibuvEventPoll
...
LibUV event will use the best available polling method on a system, kind
of like aria2 does already with the different *EventPoll
implementations.
However, libuv may support different/newer polling mechanisms; for
example on Windows it will use IO Completion Ports which are superior to
select() ;)
2013-04-10 08:47:20 +02:00
Tatsuhiro Tsujikawa
b35fbd3172
Print linked 3rd party libraries with version in `aria2c -v` output
2013-04-10 00:23:39 +09:00
Tatsuhiro Tsujikawa
d0ff31faf8
Format MessageDigest.cc
2013-04-09 23:46:25 +09:00
Tatsuhiro Tsujikawa
f333231c7a
Fix broken MessageDigst::getSupportedHashTypeString()
2013-04-09 23:45:28 +09:00
Tatsuhiro Tsujikawa
15e1a79914
Update TLSSession::checkDirection() doc
...
Make it clear that TLS_WANT_READ must be returned if underlying
SSL/TLS lib does not indicate I/O direction. This is because
SocketCore sets wantRead_ = true when TLS_WANT_READ is returned and
otherwise sets wantWrite_ = true. We only want to set wantWrite_ =
true iff we have some pending data to send.
2013-04-09 01:12:51 +09:00
Tatsuhiro Tsujikawa
83b801a0a5
Merge branch 'appletls-wantread' of https://github.com/nmaier/aria2 into nmaier-appletls-cred-kc
2013-04-09 01:09:16 +09:00
Nils Maier
16876a5334
AppleTLS: Fixup checkDirection() to return WANT_READ by default
2013-04-08 17:09:32 +02:00
Nils Maier
82a861f8d8
AppleTLS: Support credentials via KeyChain fingerprints
2013-04-08 06:45:53 +02:00
Tatsuhiro Tsujikawa
89cf6c0468
Append comment to endif
2013-04-06 16:34:49 +09:00
Tatsuhiro Tsujikawa
457356ad13
Fix make distcheck
2013-04-06 16:33:15 +09:00
Tatsuhiro Tsujikawa
ddad275dbd
Make log level INFO in addTrustedCACertFile()
...
With WARN level, they will be always printed on Mac OS and old GNUTLS
build which does not have its API.
2013-04-06 16:15:32 +09:00
Nils Maier
5709746820
AppleTLS: Block worst ciphers and log session information
2013-04-05 23:31:20 +02:00
Nils Maier
0bcbd947b4
AppleTLS: Implement AppleTLS and Apple Message Digest
2013-04-05 23:10:47 +02:00
Tatsuhiro Tsujikawa
b292ae1305
Use info level log for system trusted ca imports failure
...
This is because on some platforms (gnutls on cygwin for example),
library always fails for this function and getting ERROR every time
aria2c invoked is too hard.
2013-04-05 01:07:43 +09:00
Tatsuhiro Tsujikawa
7ce725098b
Remove default value for deprecated --enable-async-dns6 to suppress warning
2013-04-03 02:27:45 +09:00
Tatsuhiro Tsujikawa
8580c98bce
Abstract TLS session implementation
...
Now TLS session object is abstracted as TLSSession class. Currently,
we have GNUTLS and OpenSSL implementations.
2013-04-03 02:24:41 +09:00
Tatsuhiro Tsujikawa
19b5b7e214
Remove deprecated options: --enable-direct-io and --metalink-servers
2013-04-02 00:12:24 +09:00
Tatsuhiro Tsujikawa
cd1f1fb56d
Deprecate --enable-async-dns6
...
The IPv6 asynchronous name resolver is enabled if the host has at
least one interface with IPv6 address configured (the loopback address
will not be counted), which is roughly the same behaviour of the
standard getaddrinfo(3). To disable IPv6 asynchronous name resolver,
use --disable-ipv6.
2013-04-02 00:02:56 +09:00
Tatsuhiro Tsujikawa
26972b8535
Rewrite backup connection handling
...
Now dedicated ConnectCommand handles connection establishment. It
checks whether connection is established or not. It also handles
backup connection. The next Command creation is abstracted using
ControlChain struct template.
2013-04-01 23:51:33 +09:00
Tatsuhiro Tsujikawa
cf23e3e11d
Fix compile error without c-ares
2013-04-01 02:08:53 +09:00
Tatsuhiro Tsujikawa
d575e3cc77
Rewrite async DNS portion without exception
2013-04-01 02:03:22 +09:00
Tatsuhiro Tsujikawa
497c1dd8c9
Use AsyncNameResolverMan in NameResolveCommand
2013-04-01 01:56:51 +09:00
Tatsuhiro Tsujikawa
12a3eaf233
Fix uninitialized UDPTrackerClient::numWatchers_
2013-04-01 01:24:57 +09:00
Tatsuhiro Tsujikawa
b5a6c39262
Use AsyncNameResolverMan in DHTEntryPointNameResolveCommand
2013-04-01 01:24:18 +09:00
Tatsuhiro Tsujikawa
597e1a5c1b
Implement simple Happy Eyeballs for HTTP/FTP downloads
2013-04-01 00:12:27 +09:00
Tatsuhiro Tsujikawa
d671d8bf36
mingw: Ignore tunnel interface and address in 169.254.*
2013-03-31 18:02:46 +09:00
Tatsuhiro Tsujikawa
b9fb15f884
Use GetAdaptersAddresses for Mingw
2013-03-31 18:02:46 +09:00
Tatsuhiro Tsujikawa
f4a0987544
Check non-loopback (and non-linklocak for IPv6) address is configured
...
Issue A record query only when non-loopback IPv4 address is
configured. Likewise, issue AAA record query only when non-loopback
and non-linklocak IPv6 address is configured.
2013-03-31 18:02:45 +09:00
Tatsuhiro Tsujikawa
56fac58b4d
Parallel A and AAAA record lookups with c-ares
2013-03-31 18:02:45 +09:00
Tatsuhiro Tsujikawa
5535ed5f95
Code cleanup
2013-03-18 22:45:07 +09:00
Tatsuhiro Tsujikawa
d88e815033
Fix bug that invalid range error when requesting range starting 0
...
Since the change b782a56b
, we use endOffsetOverride_ as the return
value of getEndByte(). But aria2 does not send Range header field when
range starts 0 (this is because some server returns error if it
received Range: 0-), and the HttpRequest::isRangeSatisfied() checks
the equality of getEndByte() and the end byte in response header and
fails. The fix is send Range header if getEndByte() is set.
2013-03-18 22:01:36 +09:00
Tatsuhiro Tsujikawa
0fa92911d7
util.cc: Include only signal.h for opensolaris build
2013-03-17 15:42:50 +09:00
Tatsuhiro Tsujikawa
0741a14486
Revert 6b55f5d3
because it breaks opensolaris build
2013-03-17 15:42:16 +09:00
Tatsuhiro Tsujikawa
18ad88088d
Fix typo in GZipFile.h spelling
2013-03-16 20:40:39 +09:00
Tatsuhiro Tsujikawa
85de8b0642
Revert DownloadEngine.cc change in 6b55f5d3
because Debian Lenny breaks
2013-03-04 22:32:51 +09:00
Tatsuhiro Tsujikawa
588ee2f1cc
GZipFile: Move buf_, buflen_ to initializer list
2013-03-03 22:55:44 +09:00
Tatsuhiro Tsujikawa
43cb2d880a
Rewrite GZipFile::vprintf()
...
MINGW does not have vasprintf(), so we use _vscprintf() and
vsnprintf(). We want to reuse buffer, so for non-MINGW we use
vsnprintf() with retrying doubling buffer size if output is truncated.
2013-03-03 21:49:42 +09:00
Tatsuhiro Tsujikawa
e17d0f8d4e
Bring back datetime in console log
2013-03-03 18:35:07 +09:00
Tatsuhiro Tsujikawa
66a85777ad
Document UDP tracker in manual
2013-03-03 18:28:25 +09:00
Tatsuhiro Tsujikawa
baaa3a4fb2
Use IndexedList::remove_if to clean up RequestGroupMan::removeStoppedGroup
2013-03-03 18:08:19 +09:00
Tatsuhiro Tsujikawa
d4ba562710
Implement IndexedList::iterator
...
It is dangerous to expose internal iterator to the outside, which is
easily misused.
2013-03-03 18:00:42 +09:00
Tatsuhiro Tsujikawa
421ae13d40
Run checksum check if -V and -c are used and file is completed
...
With -c option, aria2 can continue download after the existing file
position. If it is not completed, then after completion aria2 runs
checksum checking if available. But if existing file has already been
completed, then CreateRequestCommand exits without issuing checksum
checking. And aria2 treats it download error because it needs checksum
verification but it has not been done. This change fixes this by
properly checking download state and issue checksum checking before
CreateRequestCommand.
2013-03-03 17:18:12 +09:00
Tatsuhiro Tsujikawa
9b99875478
Add writeOptionLine() to format 1 line of option name/value pair
2013-03-03 14:12:59 +09:00
Tatsuhiro Tsujikawa
6b55f5d393
Do changes in 8aa1db6
in other places which include signal.h
2013-03-03 13:41:03 +09:00
Tatsuhiro Tsujikawa
7c66d1952a
Merge branch 'mingw-signal' of https://github.com/nmaier/aria2 into nmaier-mingw-signal
2013-03-03 13:28:51 +09:00
Tatsuhiro Tsujikawa
122e5929c1
SessionSerializer: Remove check fp because it is always true
2013-03-03 13:20:54 +09:00
Tatsuhiro Tsujikawa
f4469b79aa
SessionSerializer crash when filename length is less than 3
2013-03-03 13:19:52 +09:00
Tatsuhiro Tsujikawa
910e40f128
Fix missing value in serialized pause option
2013-03-03 13:17:49 +09:00
Nils Maier
f2f8b14047
Support for gzipped -i and --save-session
...
Saved sessions may very large, as in hundreds and even thousands of
megabyte when dealing with large queues.
Add support to save and reload sessions to gzipped files, when libz is
available.
The session serializer will output gzipped contents when the file ends
with .gz, while the input file reader (UriListParser) will accept
whatever is thrown at it.
2013-03-02 15:48:26 +01:00
Nils Maier
b0556a7519
Do not use a virtual varargs function
...
This stuff breaks in some compiler (configurations)
2013-03-02 15:48:26 +01:00
Nils Maier
8aa1db682b
Check for sys/signal.h and/or signal.h
...
mingw-w64 does not actually have sys/signal.h, while OSX currently has a
broken signal.h
Better check the presence of both and use sys/signal.h if present, else
signal.h
2013-03-02 15:09:54 +01:00
Nils Maier
7f6a446750
Hygiene: Fix some clang warnings, mostly unused private members.
2013-03-01 13:17:52 +01:00
Nils Maier
62f842579d
Fix bustage on OSX with ./configure CC=cc CXX=c++ (clang)
2013-03-01 12:43:40 +01:00
Tatsuhiro Tsujikawa
e4bd910d43
Update doc
2013-02-26 23:43:52 +09:00
Tatsuhiro Tsujikawa
704eebfac6
Use std::remove_if
2013-02-26 23:43:20 +09:00
Tatsuhiro Tsujikawa
7f805df4f0
Use std::remove_if
2013-02-26 22:59:28 +09:00
Tatsuhiro Tsujikawa
4ac4fdf1e9
Use same port number for IPv4 and IPv6 DHT
2013-02-26 22:44:19 +09:00
Tatsuhiro Tsujikawa
33037982dc
Improve log message for server socket
2013-02-26 22:44:15 +09:00
Tatsuhiro Tsujikawa
dfac717dbf
Merge branch 'fix-initial-rq-leak' of https://github.com/nmaier/aria2 into nmaier-fix-initial-rq-leak
2013-02-26 21:56:37 +09:00
Nils Maier
d1301b8697
Do not reference RequestGroups longer than necessary
...
There is an initial vector of SharedHandle<RequestGroup> to seed the
DownloadEngine. This vector was however kept alive via main.cc ->
MultiUrlRequestInfo up until the program exits, hence effetively leaking
all initial RequestGroups and associated object instances.
Hence, as a matter of dirty-workaround, drop the contents of that initial
vector as soon as it is not required any longer.
2013-02-26 10:49:24 +01:00
Nils Maier
11b9f3ebe2
Detect console with on Windows
...
Signed-off-by: Nils Maier <maierman@web.de>
2013-02-25 20:47:43 +01:00
Tatsuhiro Tsujikawa
a49397ed19
Fix infinite loop when size of downloadResults_ exceeds maxDownloadResult_
2013-02-25 21:42:54 +09:00
Tatsuhiro Tsujikawa
2aeb7137d0
Log host and port when unexpected or unknown UDP tracker reply is received
2013-02-25 01:14:27 +09:00
Tatsuhiro Tsujikawa
d68741697a
Support UDP tracker
...
It shares UDP listening port with IPv4 DHT. At the moment, in order to
enable UDP tracker support, enable IPv4 DHT.
2013-02-25 00:56:49 +09:00
Tatsuhiro Tsujikawa
b782a56b1c
Show correct end byte in error message when HTTP response range is not ok
...
Previously, unless HTTP pipelining is enabled, end byte in that
message is always 0. With this change, it shows correct end byte sent
to the HTTP server.
2013-02-23 15:37:35 +09:00
Tatsuhiro Tsujikawa
73f4db883c
Update copyright year in version text
2013-02-21 01:39:08 +09:00
Tatsuhiro Tsujikawa
b3acf4d393
Rewrite cookie_helper::reverseDomainLevel()
2013-02-16 22:51:58 +09:00
Tatsuhiro Tsujikawa
61665d2c26
Set sa_mask when setting signal handler
2013-02-14 21:51:30 +09:00
Tatsuhiro Tsujikawa
8e3ae3b76c
Use _exit() instead of exit() where appropriate
2013-02-14 01:01:06 +09:00
Tatsuhiro Tsujikawa
3fc45edaa7
Fix bug that active downloads are not saved with --save-session-interval
2013-02-04 21:50:09 +09:00
Tatsuhiro Tsujikawa
98e7018599
Fix failure to set TCP_NODELAY on Windows
...
On Windows setting TCP_NODELAY after non-blocking connect fails
at least on Windows 7.
2013-02-03 19:09:06 +09:00
Tatsuhiro Tsujikawa
1c9cfccac4
Fix invalid iterator handling when deleting RequestGroup
2013-02-03 18:18:28 +09:00
Tatsuhiro Tsujikawa
85cd65a664
Add debug log for aligned cache write
2013-02-02 21:28:52 +09:00
Tatsuhiro Tsujikawa
561f0b3e29
Use std::deque instead of std::list in IndexedList
...
We choose faster iteration over rare slower deletion in the middle.
2013-02-01 00:03:47 +09:00
Tatsuhiro Tsujikawa
de9697fc47
Fix compiler warning
2013-01-29 21:38:58 +09:00
Tatsuhiro Tsujikawa
e583717144
Increase MAX_PEER_LIST_SIZE to 512
...
We definitely need some tests to determine this value.
2013-01-28 21:36:52 +09:00
Tatsuhiro Tsujikawa
988878930e
Check SSL_OP_NO_COMPRESSION is available before using it
2013-01-27 17:32:06 +09:00
Tatsuhiro Tsujikawa
a722500d62
Make DefaultPeerStorage::droppedPeers_ distinct
2013-01-26 19:00:03 +09:00
Tatsuhiro Tsujikawa
3a19b65dd7
Rename /BadCondition/ in Peer to /Drop/
2013-01-26 18:50:48 +09:00
Tatsuhiro Tsujikawa
91b26ab2a8
DefaultPeerStorage::addBadPeer: Updating eoi is not required after erasure
2013-01-26 18:41:43 +09:00
Tatsuhiro Tsujikawa
1e4f301ec1
Remove PeerStorage::getActivePeers() and add getUsedPeers() instead
...
PeerStorage::getUsedPeers() returns non-active peers, so caller must
call Peer::isActive() to get active peers.
2013-01-26 18:36:09 +09:00
Tatsuhiro Tsujikawa
ba69f5c0c3
Refactor peer list management in DefaultPeerStorage
...
Peer list is now divided into 2: unusedPeers_ and usedPeers_.
Duplicate check is done using std::set by comparing pair of IP address
and port. For this, only IP address and port given to the Peer
constructor are used. In other words, TCP port received from extended
message is not used for this purpose.
2013-01-26 17:50:06 +09:00
Tatsuhiro Tsujikawa
8524ac3806
Code cleanup
2013-01-25 00:10:11 +09:00
Tatsuhiro Tsujikawa
de394bbf61
DefaultPeerStorage::addPeer: Remove unnecessary '='
2013-01-25 00:08:49 +09:00
Tatsuhiro Tsujikawa
550ac8c074
Fix bug returnPeer is not called if sequence_ == INITIATOR_SEND_KEY
...
In InitiatorMSEHandshakeCommand, when aborting connection, we must
return peer to the PeerStorage. But it is not done if sequence_ is
INITIATOR_SEND_KEY. This causes stale Peer objects whose usedBy()
returns true eventually occupies peer list and aria2 cannot make any
connections.
2013-01-25 00:01:43 +09:00
Tatsuhiro Tsujikawa
32a3c441af
Fix bug: wrong parenthesis position in the condition
2013-01-24 00:04:58 +09:00
Tatsuhiro Tsujikawa
3b7566faf1
Rewritten util::uitos()
2013-01-16 23:30:02 +09:00
Tatsuhiro Tsujikawa
1c72b80aa5
Revert 53dde0a9
...
Reverted to the original strategy, but some values are tweaked.
Without TCP_NODELAY, 53dde0a9
does not work well.
2013-01-15 23:50:12 +09:00
Tatsuhiro Tsujikawa
bf4ea63a66
Disable TCP_NODELAY for BitTorrent
...
To make Request messages more often packed into 1 packet.
2013-01-15 23:17:21 +09:00
Tatsuhiro Tsujikawa
e6b0274685
Remove reqNumToCreate constraint when creating request
...
It really degrades download speed.
2013-01-15 23:07:08 +09:00
Tatsuhiro Tsujikawa
df0be5e7f0
Cosmetic change
2013-01-15 21:57:35 +09:00
Tatsuhiro Tsujikawa
88580da587
Remove Append and StringAppend
2013-01-15 21:46:03 +09:00
Tatsuhiro Tsujikawa
6a976a4118
Accept k and m as well as K and M in util::getRealSize()
2013-01-15 21:36:25 +09:00
Tatsuhiro Tsujikawa
851eb137c1
Reverted UB_MAX_OUTSTANDING_REQUEST to 256
2013-01-15 00:33:40 +09:00
Tatsuhiro Tsujikawa
53dde0a9ae
Download rate based strategy to increase outstanding request
...
This strategy performs better than old one in high latency
environment.
2013-01-15 00:02:40 +09:00
Tatsuhiro Tsujikawa
d05ef28104
Avoid tiny packet for Have and Request message
2013-01-14 21:02:58 +09:00
Tatsuhiro Tsujikawa
d8f5887bbe
Increase amount to 24K to pack Piece header and payload; fix missing goto
2013-01-14 21:01:08 +09:00
Tatsuhiro Tsujikawa
63b6075c91
Pack Piece message header and body into one chunk
2013-01-14 18:09:40 +09:00
Tatsuhiro Tsujikawa
36fcccbbdf
Reverted accidental change to CHOKE_ROUND_INTERVAL
2013-01-11 23:30:26 +09:00
Tatsuhiro Tsujikawa
1ad815061b
Rewritten SpeedCalc
2013-01-11 23:29:58 +09:00
Tatsuhiro Tsujikawa
c893d82867
Removed BtMessage::isSendingProgress()
...
DefaultBtMessageDispatcher::isSendingInProgress() now checks the
number of buffer entry in PeerConnection.
2013-01-11 20:26:31 +09:00
Tatsuhiro Tsujikawa
c04df672d1
Buffer up at most A2_IOV_MAX buffer entries for BtMessages
2013-01-11 18:46:36 +09:00
Tatsuhiro Tsujikawa
e0ea88ebcf
mingw32: Make NTFS sparse file on --file-allocation=trunc
2013-01-11 18:35:54 +09:00
Tatsuhiro Tsujikawa
357e4b1a77
Made SocketCore::readData() and readDataFrom() take void*
2013-01-11 17:03:59 +09:00
Tatsuhiro Tsujikawa
8ba0d58ee1
Vectorized write for SocketBuffer to avoid small packet
2013-01-11 16:50:04 +09:00
Tatsuhiro Tsujikawa
8e63bad2da
Added --save-session-interval option
...
--save-session-interval option saves error/unfinished downloads to a
file specified by --save-session option every SEC seconds. If 0 is
given, file will be saved only when aria2 exits.
2013-01-10 00:15:30 +09:00
Tatsuhiro Tsujikawa
87af7c32c6
Use request URI as referer if --referer="*" is given
2013-01-08 21:42:42 +09:00
Tatsuhiro Tsujikawa
08bed3f77f
Log warn if unknown option is found in config file or -i file
2013-01-07 22:42:28 +09:00
Tatsuhiro Tsujikawa
d6000024c0
Added --console-log-level option
...
--console-log-level option sets log level to output to console.
2013-01-05 18:48:09 +09:00
Tatsuhiro Tsujikawa
f019eae5df
mingw32: Use LANG_ENGLISH for error message
2012-12-27 00:53:22 +09:00
Tatsuhiro Tsujikawa
247084f9c3
Fixed bug that USR_BASENAME is not defined
...
In some cases, if the dirname is only "/", the basename will not be
defined (e.g., "/f"). This change fixes this bug.
2012-12-27 00:03:37 +09:00
Tatsuhiro Tsujikawa
bd671403bc
Fix compiler warning
2012-12-26 23:10:32 +09:00
Tatsuhiro Tsujikawa
c09a5a95f4
mingw32: Re-open files with read-only mode enabled on seeding
...
On Mingw32 build, if aria2 opens file with GENERIC_WRITE access right,
some programs cannot open the file aria2 is seeding. To avoid this
situation, re-open files with read-only enabled when seeding is about
to begin.
2012-12-24 23:03:19 +09:00
Tatsuhiro Tsujikawa
d13aa3a0b3
Added missing IndexedList.h to SRCS
2012-12-24 21:23:52 +09:00
Tatsuhiro Tsujikawa
616cd9e75f
Simplified RequestGroupMan::fillRequestGroupFromReserver
2012-12-22 23:37:44 +09:00
Tatsuhiro Tsujikawa
b017e80438
Changed threshold of using upper unit for abbrevSize
2012-12-19 23:58:24 +09:00
Tatsuhiro Tsujikawa
07bb779eb0
Faster deletion of RequestGroup and DownloadResult lists
2012-12-19 23:03:48 +09:00
Tatsuhiro Tsujikawa
c8565360b0
Removed unused variables
2012-12-17 00:43:13 +09:00
Tatsuhiro Tsujikawa
77a4ee4de0
Save gid option with --save-session option
2012-12-17 00:33:11 +09:00
Tatsuhiro Tsujikawa
0a4ce4fdb5
Use map to make DownloadResult lookup fast
2012-12-16 18:50:45 +09:00
Tatsuhiro Tsujikawa
0001f4cfbd
Added --gid option
...
This option sets GID manually. aria2 identifies each download by the
ID called GID. The GID must be hex string of 16 characters, thus
[0-9a-zA-Z] are allowed and leading zeros must not be stripped. The
GID all 0 is reserved and must not be used. The GID must be unique,
otherwise error is reported and the download is not added. This
option is useful when restoring the sessions saved using
--save-session option. If this option is not used, new GID is
generated by aria2.
2012-12-16 18:22:13 +09:00
Tatsuhiro Tsujikawa
b9da9d4ed3
Use 64 bits random bytes as GID
...
This change replaces the current 64 bit sequential GID with 64 bits
random bytes GID in an attempt to support persistent GID. Internally,
the GID is stored as uint64_t. For human representation and RPC
interface, GID is represented as 16 bytes hex string. For console
readout, 16 bytes are too long, so it is abbreviated to first 6 bytes.
When querying GID in RPC calls, user can speicfy the prefix of GID as
long as the prefix is shared by more than 1 GID entries.
2012-12-16 17:29:01 +09:00
Tatsuhiro Tsujikawa
04586f50b1
Fixed BitfieldMan::getOffsetCompletedLength overflow on 32-bit systems
2012-12-16 17:26:01 +09:00
Tatsuhiro Tsujikawa
de1ca6d6b8
mingw32: Use HANDLE only for MinGW32 build
2012-12-15 18:28:46 +09:00
Tatsuhiro Tsujikawa
2235743de3
Changed console readout, making it more compact
...
"SIZE:" is removed because it is obvious. SEEDING, SEED, SPD and UP
are now replaced with SEED, SD, DL and UL respectively.
2012-12-12 23:22:04 +09:00
Tatsuhiro Tsujikawa
4fdd5da27d
Compact readout when more than 1 simultaneous downloads are going on
...
If more than 1 simultaneous downloads are going on, use more compact
format in readout. Currently, at most 5 download stats are displayed.
util::abbrevSize() is rewritten to support "Gi" unit and provides more
compact abbreviation.
2012-12-11 23:40:06 +09:00
Tatsuhiro Tsujikawa
79fce29bda
Fixed segmentation fault if fp_ is NULL
2012-12-11 23:39:12 +09:00
Tatsuhiro Tsujikawa
e86fd44dc5
Console color output
...
Log level and download result string is now colored.
2012-12-08 21:48:18 +09:00
Tatsuhiro Tsujikawa
9a5fff0de0
Logger: Simplified console output and change level format in log
...
The date and time are now removed from console output. The log level
is now formatted as "[LEVEL]".
2012-12-08 19:13:59 +09:00
Tatsuhiro Tsujikawa
2364f809c3
Code cleanup: Merged successive string literals in readout
2012-12-08 19:09:03 +09:00
Tatsuhiro Tsujikawa
bf56f3c299
Check the output file is terminal or not in ctor
2012-12-08 18:38:30 +09:00
Tatsuhiro Tsujikawa
9d7bb9d01a
Release statically allocated resources for prefs and options
...
Not realeasing these resources does not hurt the correctness of the
program, but memory leak detection tool, such as valgrind, reports it
as potential memory leak. It is better to distinguish it from the real
ones.
2012-12-08 17:52:10 +09:00
Tatsuhiro Tsujikawa
901227db9b
Updated usage of --disk-cache
2012-12-07 00:44:42 +09:00
Tatsuhiro Tsujikawa
7a02177698
Start to find faster host before the number of missing segments becomes 1
...
The old implementation starts to find faster host when the number of
missing segment becomes 1. Because of --min-split-size option, before
the number of missing segment becomes 1, the number of connection
becomes 1 and it can be slow. In this case, we have to wait until the
last segment is reached. The new implementation starts to find faster
host when the remaining length is less than --min-split-size * 2, to
mitigate the problem stated above.
2012-12-07 00:32:44 +09:00
Tatsuhiro Tsujikawa
5683f2fb3e
Removed unused staticSHA1Digest
2012-12-07 00:12:22 +09:00
Tatsuhiro Tsujikawa
bec0f6dc11
Removed warning when --file-allocation=falloc is used in MinGW32 build
...
The warning was just a mistake. SetFilePointerEx + SetEndOfFile
actually allocate disk space.
2012-12-06 22:48:46 +09:00
Tatsuhiro Tsujikawa
a6b18c868b
Log size before flush
2012-12-06 03:04:41 +09:00
Tatsuhiro Tsujikawa
df5f1fe77f
Fixed bug that size_ is not updated when WrDiskCacheEntry::append is called
2012-12-06 03:04:05 +09:00
Tatsuhiro Tsujikawa
838949ab85
Append new data to the contagious cache data
...
If we receive small data (e.g., 1 or 2 bytes), cache entry becomes a
headache. To mitigate this problem, we allocate cache buffer at least
4KiB and append the data to the contagious cache data.
2012-12-06 02:23:32 +09:00
Tatsuhiro Tsujikawa
2c5e77f422
Flush cached data on checkout/cancel Segment
...
This change prevents the cached data from overlap because of BT peers.
2012-12-06 01:16:28 +09:00
Tatsuhiro Tsujikawa
56c498bcbf
Clear write cache on Segment::clear and Piece::clearAllBlock
2012-12-06 00:39:14 +09:00
Tatsuhiro Tsujikawa
9ed8502e74
Write data in 4K aligned offset in write with disk cache enabled
...
This greatly reduces disk activity especially on Win + NTFS. Not so
much difference on Linux.
2012-12-06 00:17:11 +09:00
Tatsuhiro Tsujikawa
911851debb
mingw32: Removed FSCTL_SET_SPARSE set
2012-12-03 23:07:05 +09:00
Tatsuhiro Tsujikawa
f314719618
Added --disk-cache option
...
This option enables disk cache. If SIZE is 0, the disk cache is
disabled. This feature caches the downloaded data in memory, which
grows to at most SIZE bytes. The cache storage is created for aria2
instance and shared by all downloads. The one advantage of the disk
cache is reduce the disk seek time because the data is written in
larger unit and it is reordered by the offset of the file. If the
underlying file is heavily fragmented it is not the case.
2012-12-03 01:39:10 +09:00
Tatsuhiro Tsujikawa
8ac433a8e9
Fixed compile error without SSL/TLS lib
2012-12-01 23:37:57 +09:00
Tatsuhiro Tsujikawa
2cbdd8b845
Fixed compile error without BitTorrent support
2012-12-01 21:33:25 +09:00
Tatsuhiro Tsujikawa
7e59e2dbb5
mingw32: Open file using _wsopen and added --enable-mmap support
...
I tried CreateFile but the subsequent ReadFile fails with Access
Denied if sparse file is read on NTFS. I mostly reverted previous
changes and use _wsopen with read/write share enabled instead of
CreateFile.
This change also includes --enable-mmap support for MinGW32
build. Memory mapped file may be useful for 64-bits OS and lots of
RAM. Currently, FlushViewOfFile is not called during the download, so
it is slightly vulnerable against sudden power loss. I found lots of
read when resuming download due to page fault. So for now it is useful
for the initial download. I recommend not to use
--file-allocation=prealloc with --enable-mmap for MinGW32, because it
triggers page faults even in the initial download. Anyway, the option
is experimental.
2012-12-01 19:38:30 +09:00
Tatsuhiro Tsujikawa
b95f15b462
Use Win32 API for file I/O in AbstractDiskWriter
...
Now file has been opened by aria2 is now readable by other processes.
2012-11-30 01:20:49 +09:00
Tatsuhiro Tsujikawa
74520b03f8
Set F_GLOBAL_NOCACHE for Mac OS X
2012-11-28 21:47:55 +09:00
Tatsuhiro Tsujikawa
506a9358e1
Refactored file open code
2012-11-28 21:46:44 +09:00
Tatsuhiro Tsujikawa
16e25ef4e1
Enabled TCP_NODELAY in SocketCore::establishConnection and acceptConnection
2012-11-28 00:20:43 +09:00
Tatsuhiro Tsujikawa
e781e6eac1
Made socket non-blocking mode in SocketCore::beginListen()
2012-11-28 00:15:03 +09:00
Tatsuhiro Tsujikawa
438f95abae
Made socket non-blocking mode in SocketCore::acceptConnection()
2012-11-28 00:10:32 +09:00
Tatsuhiro Tsujikawa
e0dcb942b2
Added --force-save option.
...
--force-save option saves download with --save-session option even if
the download is completed or removed. This may be useful to save
BitTorrent seeding which is recognized as completed state. The
default value is false.
2012-11-17 15:33:44 +09:00
Tatsuhiro Tsujikawa
2ee4361848
Removed unused static function util::parseParam
2012-11-17 14:38:55 +09:00
Tatsuhiro Tsujikawa
9c1fe4addd
Use array_ptr to remove try block
2012-11-15 22:05:59 +09:00
Tatsuhiro Tsujikawa
6b2f5ab1f5
SocketCore::bind now accepts const char* host instead of std::string
2012-11-15 21:09:10 +09:00
Tatsuhiro Tsujikawa
b2893f1e31
Get the correct uploaded data size
...
Subtract msgHdrLen_ from writtenLength to get the uploaded data size.
Without this correction, the seeder assumes it has uploaded more data
than it actually has.
2012-11-04 16:49:39 +09:00
Tatsuhiro Tsujikawa
31189b1222
Made return type of util::parse_content_disposition ssize_t
2012-11-01 22:54:32 +09:00
Tatsuhiro Tsujikawa
08cd68ec95
Removed Socket.h from SRCS
2012-10-31 19:07:08 +09:00
Tatsuhiro Tsujikawa
bf342a2827
Fixed compile error with mingw
2012-10-31 17:10:49 +09:00
Tatsuhiro Tsujikawa
d4e7b51eb9
Made --http-no-cache false by default
2012-10-31 16:44:28 +09:00
Tatsuhiro Tsujikawa
49e9f66c16
Use len formal parameter of util::parse_content_disposition
2012-10-31 01:24:10 +09:00
Tatsuhiro Tsujikawa
5dfd1a5af7
Fixed memory leak
2012-10-29 23:43:35 +09:00
Tatsuhiro Tsujikawa
00e3151110
Initialized member
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
f60b956a48
Removed always-true condition
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
2676bbe9c6
Initialized scalar members
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
feb548e174
Removed unused members
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
6fddbc845c
Removed dead code
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
f42199b46d
Fixed resource leak
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
8566d050ff
Reset stream format state
2012-10-29 22:39:09 +09:00
Tatsuhiro Tsujikawa
d6f73292fa
gnutls: Added more status checking when verifying peer
2012-10-27 17:46:53 +09:00
Tatsuhiro Tsujikawa
118aed9c24
Content-Disposition parser conforming to RFC 6266.
...
RFC 2231 Continuation is not supported.
2012-10-27 14:51:07 +09:00
Tatsuhiro Tsujikawa
21c3903af0
Simplified TransferStat struct
2012-10-26 00:16:20 +09:00
Tatsuhiro Tsujikawa
0ecfa19925
Reworked download/upload statistics calculation
...
The old implementation calculates download/upload statistics for a
RequestGroup by summing up all PeerStat objects. For global
statistics, those are summed together. This clearly incurs runtime
penalty and we introduced some kind of caching which updates
statistics every 250ms but it did not work right.
This change removes all these aggregation code, and instead makes
RequestGroup and RequestGroupMan objects hold NetStat object and
download/upload bytes are directly calculated by thier own NetStat.
This is far more simplar than the old way and less runtime penalty and
brings more accuracy.
2012-10-25 23:33:45 +09:00
Tatsuhiro Tsujikawa
46bdaf0e8d
Made HTTP/FTP download speed limiter more accurate
...
We have to do the same thing for BitTorrent.
2012-10-24 01:05:41 +09:00
Tatsuhiro Tsujikawa
da8086cbc9
Updated doc
2012-10-16 22:55:14 +09:00
Tatsuhiro Tsujikawa
a9c76ed35e
Added --rpc-save-upload-metadata option
...
If true is given, which is default, save the uploaded torrent or
metalink metadata in the directory specified by --dir option. The
filename consists of SHA1-hash hex string of metadata plus
extension. For torrent, the extension is '.torrent'. For metalink, it
is '.meta4'. If false is given to this option, the downloads added by
aria2.addTorrent or aria2.addMetalink will not be saved by
--save-session option.
2012-10-16 00:18:34 +09:00
Tatsuhiro Tsujikawa
4a4fec2c8c
Removed socket readability check from checkIfConnectionEstablished()
2012-10-15 23:27:51 +09:00
Tatsuhiro Tsujikawa
841395f332
Perform SSL/TLS handshake after checking whether connection is established
2012-10-15 23:26:51 +09:00
Tatsuhiro Tsujikawa
c904aa50fe
Use uri_split instead of uri::parse where appropriate
2012-10-14 18:05:34 +09:00