summaryrefslogtreecommitdiff
path: root/src/RequestGroup.cc
Commit message (Collapse)AuthorAgeFilesLines
* flush OS write buffers before saving control fileAli MJ Al-Nasrawy2020-06-171-0/+2
| | | | | | | | | | This ensures that pieces are physically written to disk before marking them as finished in the control file. This should prevent data loss and corruption when resuming downloads after a system crash. Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
* flush internal buffers before auto-saving control fileAli MJ Al-Nasrawy2020-06-171-1/+4
| | | | | | | | | | Otherwise, some pieces may be marked as finished in the control file though they have not yet been written to the storage file. This should prevent data loss and corruption when resuming downloads after an app crash. Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
* Enable IndentPPDirectivesTatsuhiro Tsujikawa2018-06-091-31/+31
|
* Take into account address family when resolving DHT node addressTatsuhiro Tsujikawa2016-12-031-10/+22
|
* Use default where possibleNils Maier2016-08-291-1/+1
|
* clang-formatTatsuhiro Tsujikawa2016-07-211-2/+1
|
* Better auto-renamingNils Maier2016-07-191-1/+21
| | | | | | | | | | | | | | | | | | Up until now aria2 file auto renaming worked by just appending a new unique number to the file path, behind the file name extension, if any, changing what most other programs consider the file extension in the process. Now, aria2 will attempt to insert the number before the file extension, leaving the extension intact, so that e.g. a ".jpg" still is a ".jpg" file and opens in your configured image viewer when clicking it. If a file has no extension (incl. so called "dot files"), the number will be appended to the file name as usual. Note: This is a potentially breaking change that might break third party scripts that rely on aria2 auto file renaming producing a certain format for renamed files. Please fix your scripts accordingly. Closes GH-709
* Change have entry indexing methodTatsuhiro Tsujikawa2016-07-101-1/+1
| | | | Now use increasing sequence of integer rather than timer value.
* Fix uninitialized variableTatsuhiro Tsujikawa2016-06-141-0/+1
|
* Merge branch 'master' into dynamic-select-fileTatsuhiro Tsujikawa2016-05-221-0/+29
|\
| * mingw32: Gain privilege before opening filesTatsuhiro Tsujikawa2016-05-181-0/+29
| |
* | Restart active download to apply previously not applicable optionsTatsuhiro Tsujikawa2016-05-061-0/+7
|/ | | | | | | | | | | | | | | Previously, we categorized options that can be used in aria2.changeOption RPC method into 2 categories. The options in one category can be applied on the fly, meaning that download continues to be active while applying options. Another category includes options which are only applicable when downloads are waiting or paused. In this change, when active download is ordered to change options which only applicable in waiting or paused state, it is now paused, and then automatically restarted. Although we have limited number of download concurrency, the pause and restart is done atomically, and the download is inserted at the front of the queue, it is picked up immediately if the concurrency regulation allows.
* Fix downloaded metaurl torrent filenameTatsuhiro Tsujikawa2016-04-231-1/+3
|
* Add bittorrent key to aria2.tellStopped statusTatsuhiro Tsujikawa2016-04-171-0/+1
|
* 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
|