summaryrefslogtreecommitdiff
path: root/src/RequestGroup.cc
Commit message (Collapse)AuthorAgeFilesLines
* Run checksum check if -V and -c are used and file is completedTatsuhiro Tsujikawa2013-03-031-1/+9
| | | | | | | | | | | 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.
* Hygiene: Fix some clang warnings, mostly unused private members.Nils Maier2013-03-011-3/+3
|
* Use 64 bits random bytes as GIDTatsuhiro Tsujikawa2012-12-161-18/+11
| | | | | | | | | | 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.
* Added --disk-cache optionTatsuhiro Tsujikawa2012-12-031-0/+4
| | | | | | | | | | 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.
* Simplified TransferStat structTatsuhiro Tsujikawa2012-10-261-8/+8
|
* Reworked download/upload statistics calculationTatsuhiro Tsujikawa2012-10-251-13/+5
| | | | | | | | | | | | | | 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.
* Removed trailing spacesTatsuhiro Tsujikawa2012-10-011-4/+4
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-6/+7
|
* Code cleanupTatsuhiro Tsujikawa2012-09-281-27/+32
|
* Use const char* instead of static const std::stringTatsuhiro Tsujikawa2012-09-241-2/+2
|
* Rewritten DownloadHandlerConstantsTatsuhiro Tsujikawa2012-09-221-19/+0
| | | | | | | | | | DownloadHandlerConstants was simplified. MIME type handling in Accept header was also reworked. DownloadContext's metalinkServerContacted_ is replaced with acceptMetalink_ and its boolean value is reverted. RequestGroup and HttpRequest now do not hold vector of accepting types. HttpRequest has the flag acceptMetalink_ which will be set by the same value of DownloadContext::accpetMetalink_ and if it is true, Metalink MIME types are added to Accept header field.
* Use std::vector instead of std::map for ContextAttribute objectsTatsuhiro Tsujikawa2012-09-221-6/+6
| | | | Now key for ContextAttribute object store is int instead of string.
* Don't check control file existence if isPreLocalFileCheckEnabled() == falseTatsuhiro Tsujikawa2012-08-311-1/+1
|
* Add GID => RequestGroup index for faster access to RequestGroupTatsuhiro Tsujikawa2012-07-311-0/+1
|
* Removed static_cast<int64>()s where they are unnecessaryTatsuhiro Tsujikawa2012-06-251-5/+3
|
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-06-251-8/+8
| | | | | Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
* Use PRId64 for int64_t format specifierTatsuhiro Tsujikawa2012-06-251-7/+7
|
* Fixed compile error without libnettle, libgcrypt and opensslTatsuhiro Tsujikawa2012-01-081-13/+14
|
* aria2 now doesn't assume download's completed just because file size matchedTatsuhiro Tsujikawa2012-01-081-23/+16
| | | | | | | | The only exception is zero-length file. If server tells file is zero-length and --checksum option is given, aria2 now correctly checks its checksum. There is one known issue: If downloaded file is zero-length file and .aria2 file exists, it will not be deleted on successful verification, because .aria2 file is not loaded.
* Use int instead of unsigned int where unsigned int is not needed.Tatsuhiro Tsujikawa2011-12-091-11/+12
|
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-9/+9
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* Made notice level log messages translatableTatsuhiro Tsujikawa2011-12-021-4/+4
|
* Use %lld to fomat a2_gid_tTatsuhiro Tsujikawa2011-12-021-11/+6
|
* Use fmt instead of util::itosTatsuhiro Tsujikawa2011-11-131-8/+6
|
* Removed strconcatTatsuhiro Tsujikawa2011-11-121-1/+4
|
* Code cleanup. Avoid std::string temporaries.Tatsuhiro Tsujikawa2011-11-051-4/+4
|
* Changed interface of BtRegistry.Tatsuhiro Tsujikawa2011-11-011-10/+11
| | | | BtRegistry now uses SharedHandle<BtObject> instead of BtObject.
* Don't copy Option in RequestGroup ctor.Tatsuhiro Tsujikawa2011-10-251-1/+1
| | | | Copy on receive is not a practice in aria2 source code.
* Renamed DownloadResult::bitfieldStr to bitfield and changed itsTatsuhiro Tsujikawa2011-10-131-2/+3
| | | | content from hex string to raw byte string.
* Renamed DownloadResult::infoHashStr to infoHash and changed itsTatsuhiro Tsujikawa2011-10-131-1/+2
| | | | contents from hex digest to raw byte string.
* Removed utf8ToNative from log message and exception message.Tatsuhiro Tsujikawa2011-08-081-17/+14
|
* In MinGW32, open file with UNICODE filename and print them in ANSI.Tatsuhiro Tsujikawa2011-08-041-18/+21
|
* Fixed the bug due to dangling pointers in RequestGroup.Tatsuhiro Tsujikawa2011-07-211-0/+2
| | | | | | | | RequestGroup holds a poitner to btRuntime_ and peerStorage_. After removing them from BtRegistry, we failed to set 0 to them. When program access them, it goes undefined world, such as random crash. We found this bug when pasuing download and valgrind warned memory corruption.
* Replaced InOrder with Inorder.Tatsuhiro Tsujikawa2011-06-111-2/+2
|
* Don't save removed download in --save-session text file.Tatsuhiro Tsujikawa2011-05-291-3/+4
| | | | | Now stat column of removed downloads in Download Results is 'RM' instead of INPR.
* Updated docTatsuhiro Tsujikawa2011-03-181-1/+1
|
* Replaced gid_t with a2_gid_t cause gid_t is commonly used as group ID.Tatsuhiro Tsujikawa2011-03-171-2/+2
|
* Eliminated SocketCore::peekData() form HTTP/FTP downloads.Tatsuhiro Tsujikawa2011-01-161-0/+1
| | | | | | | | | | We introduced SocketRecvBuffer which buffers received bytes. Since HTTP response header and response body are divided with \r\n, we have to buffer up several bytes to find this delimiter. We use SocketRecvBuffer to hold these bytes and only consumes header and passes SocketRecvBuffer, which may contain head of response body, to next Command. Since FTPConnection doesn't use SocketCore::peekData(), we left it as is.
* Fixed arithmetic exception when completedLength is 0.Tatsuhiro Tsujikawa2010-12-041-3/+4
|
* Removed DownloadContext::dir_. Use PREF_DIR value instead.Tatsuhiro Tsujikawa2010-12-031-1/+1
|
* Added additional error_code::Values(9 through 14).Tatsuhiro Tsujikawa2010-11-281-16/+24
|
* Replaced RequestGroup::lastUriResult_ withTatsuhiro Tsujikawa2010-11-281-8/+3
| | | | RequestGroup::lastErrorCode_.
* Renamed DownloadErrorCode.h as error_code.h. RenamedTatsuhiro Tsujikawa2010-11-281-6/+6
| | | | downloaderrorcode::Value as error_code::Value.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-29/+24
| | | | | | Replaced StringFormat with fmt
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-86/+70
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-151-16/+19
| | | | | | | Use SharedHandle::swap() in some places. * src/RequestGroup.cc
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-2/+0
| | | | | | Removed unused includes.
* 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-121-35/+39
| | | | | | | | Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
* 2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-111-7/+7
| | | | | | | | | | | | | | Create SharedHandle outside of function call to avoid unexpected memory leak. * src/AnnounceList.cc * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/RequestGroup.cc * src/RequestGroupMan.cc * src/UTMetadataPostDownloadHandler.cc * src/download_helper.cc
* 2010-10-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-111-3/+2
| | | | | | | | | | | Use RFC1123 date format in debug log of MDTM response and last-modified time and creation date of .torrent file printed using -S. * src/FtpNegotiationCommand.cc * src/RequestGroup.cc * src/bittorrent_helper.cc