Commit Graph

2725 Commits (8524ac38067ba2ca2e692de39166edd6612e1d5b)

Author SHA1 Message Date
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