Tatsuhiro Tsujikawa
e823fe8bb5
Set log level DEBUG for unittests
2013-07-06 15:56:08 +09:00
Tatsuhiro Tsujikawa
28d5c7408f
Check that C++ compiler supports override keyword
...
If the compiler supports override, define CXX11_OVERRIDE as override,
otherwise define it as empty. Use CXX11_OVERRIDE instead of override.
2013-07-06 15:54:03 +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
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
7e6db8d801
Use std::unique_ptr instead of array_ptr
2013-07-03 23:23:22 +09:00
Tatsuhiro Tsujikawa
df0034f1cd
Add countSetBitSlow tests
2013-07-03 23:22:40 +09:00
Tatsuhiro Tsujikawa
74d6d64271
Use std::unique_ptr for MessageDigest
2013-07-03 01:13:13 +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
529b9fdceb
Use std::unique_ptr for ExtensionMessage
2013-07-01 21:42:51 +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
03ae308faa
Use RequestSlot as pointer to avoid copying
2013-06-30 00:31:50 +09:00
Tatsuhiro Tsujikawa
5a223115e0
Rewrite CookieStorage
2013-06-29 23:09:09 +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
2761301dfb
Rewrite util::divide
2013-06-25 00:07:15 +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
23086b6e21
AbstractBtMessage: Use std::unique_ptr for validator
2013-06-23 16:12:19 +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
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
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
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
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
232d31afaf
Add test for recent changes in SessionSerializer
2013-05-28 22:59:54 +09: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
7669c72d03
Add unittest for DownloadResultDH
2013-05-27 22:04:44 +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
db1106101d
Fix compile error without bittorrent support
2013-05-23 00:46:08 +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
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
be4c9aa95e
Test failure without Metalink and BitTorrent support
2013-05-15 23:31:49 +09:00
Tatsuhiro Tsujikawa
8e8fb9ee36
Add addTorrent API
2013-05-15 23:29:28 +09:00
Tatsuhiro Tsujikawa
4e8742597a
Add aria2api unit tests
2013-05-15 22:59:26 +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
d07b3ff8d9
Suppress console output for none-standalone mode
2013-05-02 11:30:42 +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
9041be8e32
Add tailmatch testcase for cookie
2013-04-15 21:30:15 +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
80dbaf2566
Use util::sleep() instead of sleep()
2013-03-31 18:02:46 +09:00
Tatsuhiro Tsujikawa
15b19f7baf
Add timeout when receiving Multicast packet in LpdMessageDispatcherTest
2013-03-21 21:38:55 +09:00
Tatsuhiro Tsujikawa
5e4029a355
Fix unit test HttpRequestTest.cc
2013-03-18 22:47:12 +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
841fdbb965
Add GZipFileTest
...
For now, it is a copy of BufferedFileTest.cc
2013-03-03 14:16:32 +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
7f6a446750
Hygiene: Fix some clang warnings, mostly unused private members.
2013-03-01 13:17:52 +01:00
Tatsuhiro Tsujikawa
a49397ed19
Fix infinite loop when size of downloadResults_ exceeds maxDownloadResult_
2013-02-25 21:42:54 +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
67fa274578
Add test when instance-length is 0
2013-02-21 00:42:37 +09:00
Tatsuhiro Tsujikawa
45a128a7e8
Add test for saving finished download with force-save option
2013-02-04 21:56:48 +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
1c9cfccac4
Fix invalid iterator handling when deleting RequestGroup
2013-02-03 18:18:28 +09:00
Tatsuhiro Tsujikawa
13975f66a2
test: Add missing filelist2.txt to EXTRA_DIST
2013-02-02 21:22:18 +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
3a19b65dd7
Rename /BadCondition/ in Peer to /Drop/
2013-01-26 18:50:48 +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
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
2e216a9403
Fix unit test error
2013-01-14 21:34:33 +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
8ba0d58ee1
Vectorized write for SocketBuffer to avoid small packet
2013-01-11 16:50:04 +09:00
Tatsuhiro Tsujikawa
87af7c32c6
Use request URI as referer if --referer="*" is given
2013-01-08 21:42:42 +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
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
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
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
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
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