summaryrefslogtreecommitdiff
path: root/src/RequestGroup.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into random-webseedingTatsuhiro Tsujikawa2016-03-261-339/+335
|\
| * Add following to aria2.tellStatus response key as reverse link for followedByTatsuhiro Tsujikawa2016-03-051-0/+2
| |
| * Fix compile error with --disable-bittorrentTatsuhiro Tsujikawa2016-02-151-1/+6
| |
| * Add "seeder" key to tellStatus RPC responseTatsuhiro Tsujikawa2016-02-031-0/+6
| |
| * Reduce delay in tracker requestTatsuhiro Tsujikawa2016-01-191-2/+14
| | | | | | | | | | | | | | We eliminated 1 second delay between completion of name resolution for tracker request and time when it is actually issued. We also elimited 1 second delay after last torrent download exists and it is told to DHTInteractionCommand.
| * make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-330/+295
| |
| * Fix bug that pause/unpause seeding torrent prevents new downloads from startingTatsuhiro Tsujikawa2015-12-021-0/+3
| | | | | | | | | | | | | | | | | | Previously, with --bt-detach-seed-only, when user issued pause and unpause command to seeding torrent, and it was started again, and it immediately got seeding status, but aria2 did not start new download waiting in the queue. This commit fixes this bug. See GH-490
| * Send the last error message as part of tellStatus RPC responseJarda Snajdr2015-11-181-7/+10
| |
* | Merge branch 'master' into random-webseedingTatsuhiro Tsujikawa2015-10-031-7/+8
|\|
| * Use user-defined literals for time unitsTatsuhiro Tsujikawa2015-06-211-1/+1
| |
| * Use std::shuffle, instead of std::random_shuffleTatsuhiro Tsujikawa2015-06-111-2/+2
| |
| * Replace timer facility with chrono libTatsuhiro Tsujikawa2015-06-091-5/+6
| |
* | Add --stream-piece-selector=randomTatsuhiro Tsujikawa2015-02-141-2/+1
|/
* Fix compiler warningNils Maier2014-12-121-1/+1
|
* Add --bt-detach-seed-only optionTatsuhiro Tsujikawa2014-10-141-1/+16
| | | | | | | | | | This option excludes seed only downloads when counting concurrent active downloads (-j option). This means that if -j3 is given and this option is turned on and 3 downloads are active and one of those enters seed mode, then it is excluded from active download count (thus it becomes 2), and the next download waiting in queue gets started. But be aware that seeding item is still recognized as active download in RPC method.
* Use std::make_shared and make_unique where possible, part 2Tatsuhiro Tsujikawa2014-09-131-2/+2
|
* Fix use-after-free on exit with multi-file torrent download + DHTTatsuhiro Tsujikawa2014-06-081-1/+4
| | | | | | | | | | | DefaultPieceStorage may be referenced by one of DHT task (e.g., DHTPeerLookupTask), after RequestGroup was deleted, and even after RequestGroupMan was deleted. DefaultPieceStorage has a reference to MultiDiskAdaptor which calls RequestGroupMan object on destruction. So when DHT task is destroyed, DefaultPieceStorage is destroyed, which in turn destroys MultiDiskAdaptor. DHT task is destroyed after RequestGroupMan was destroyed, MultiDiskAdaptor will use now freed RequestGroupMan object, this is use-after-free.
* Revert to existing "proper" coding styleTatsuhiro Tsujikawa2014-06-031-77/+77
| | | | | The rule is simple: don't try to change the coding style of the existing codebase.
* Remove ENABLE_MESSAGE_DIGEST, since we got the internal md, alwaysNils Maier2014-04-171-16/+2
|
* Fix crash if unpause failed before assigning BtProgressInfoFile objectTatsuhiro Tsujikawa2014-01-051-1/+1
|
* Run DHT if torrent is private; but don't use DHT for that torrentTatsuhiro Tsujikawa2013-12-201-39/+26
|
* Stuff memory holesNils Maier2013-12-091-19/+19
| | | | | | | | | | | | | | | | | | Padding changes on x86_64: - RequestGroup: 29 -> 5 bytes - DownloadContext: 25 -> 1 bytes - Cookie: 20 -> 4 bytes - Command: 8 -> 0 bytes (affects many derived as well) - HttpRequest: 20 -> 4 bytes - DownloadCommand: 18 -> 2 bytes - TimeBasedCommand: 14 -> 6 bytes - AbstractCommand: 13 -> 5 bytes - HttpSkipResponseCommand: 12 -> 4 bytes - FileEntry: 10 -> 2 bytes - DownloadResult: 15 -> 7 bytes - UriStruct: 12 -> 4 bytes - Piece: 11 -> 3 bytes - BitfieldMan -> 11 -> 3 bytes
* Limit number of opened file globally with --bt-max-open-files optionTatsuhiro Tsujikawa2013-11-171-0/+1
| | | | | | | | | | This change changes the behavior of --bt-max-open-files. Previously, it specifies the maximum number of opened files for each multi-file download. Since it is more useful to limit the number globally, the option now specifies the global limit. This change suggests that aria2.changeOption() method now ignores --bt-max-open-files and aria2.changeGlobalOption now reads it and dynamically change the limit.
* Refactor DownloadHandlerFactoryTatsuhiro Tsujikawa2013-11-101-9/+12
|
* Don't fail multiple concurrent dl same file if auto-file-renaming is enabledTatsuhiro Tsujikawa2013-11-081-18/+21
|
* Cleanup RequestGroup code a bitNils Maier2013-09-201-455/+452
|
* More auto-converts by cpp11-migrateNils Maier2013-09-201-4/+2
|
* Convert to autos and ranged loopsNils Maier2013-08-211-3/+3
|
* Convert most 0/NULL pointers to nullptrNils Maier2013-08-201-6/+6
| | | | Courtesy of llvm cpp11-migrate 3.3
* BtRegistry: Use std::unique_ptr for BtObjectTatsuhiro Tsujikawa2013-07-061-10/+8
|
* DownloadEngine: Use std::unique_ptr for btRegistry_Tatsuhiro Tsujikawa2013-07-061-1/+1
|
* Use std::unique_ptr for CheckIntegrityEntry and FileAllocationEntryTatsuhiro Tsujikawa2013-07-061-30/+21
|
* Use std::unique_ptr for PieceSelector instead of std::shared_ptrTatsuhiro Tsujikawa2013-07-041-8/+6
|
* Use std::unique_ptr for URISelector instead of std::shared_ptrTatsuhiro Tsujikawa2013-07-041-3/+3
|
* Use std::unique_ptr in DHTRegistryTatsuhiro Tsujikawa2013-07-021-3/+3
|
* Wrap Command object in std::unique_ptrTatsuhiro Tsujikawa2013-06-231-26/+21
|
* DefaultBtAnnounce: Use non-owning raw pointer for downloadContext_Tatsuhiro Tsujikawa2013-06-231-3/+3
|
* DownloadContext::attrs_ now holds std::unique_ptrTatsuhiro Tsujikawa2013-06-231-4/+2
| | | | DownloadContext::getAttribute() returns a raw pointer.
* Use std::unique_ptr instead of std::shared_ptrTatsuhiro Tsujikawa2013-06-221-1/+1
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-44/+44
|
* 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
|