summaryrefslogtreecommitdiff
path: root/src/RequestGroupMan.cc
Commit message (Collapse)AuthorAgeFilesLines
* Enable IndentPPDirectivesTatsuhiro Tsujikawa2018-06-091-1/+1
|
* Fix compiler warning with Android NDK clangTatsuhiro Tsujikawa2017-01-231-1/+1
|
* Fix bug that lower bound of optimize-concurrent-downloads becomes 1Tatsuhiro Tsujikawa2016-12-051-1/+1
|
* clang-format-3.9Tatsuhiro Tsujikawa2016-10-151-1/+2
|
* Add --keep-unfinished-download-result optionTatsuhiro Tsujikawa2016-09-241-2/+10
| | | | | | | | | This option keeps unfinished download results even if doing so exceeds --max-download-result. This is useful if all unfinished downloads must be saved in session file (see --save-session option). Please keep in mind that there is no upper bound to the number of unfinished download result to keep. User should use this option only when they know the total number of downloads in advance.
* Restart active download to apply previously not applicable optionsTatsuhiro Tsujikawa2016-05-061-5/+23
| | | | | | | | | | | | | | | 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 compile error with Android NDKrelease-1.22.0Tatsuhiro Tsujikawa2016-04-151-4/+6
|
* clang-formatTatsuhiro Tsujikawa2016-03-261-26/+38
|
* Remove trailing white spacesTatsuhiro Tsujikawa2016-03-161-4/+4
|
* Added support for a dynamic management of the number of concurrent downloads ↵oliviercommelarbre2016-03-161-4/+70
| | | | as a function of the overall bandwidth observed
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-280/+298
|
* Send the last error message as part of tellStatus RPC responseJarda Snajdr2015-11-181-1/+1
|
* Fix on-download-error is executed even if download succeededTatsuhiro Tsujikawa2015-08-011-8/+16
|
* Fix formatting issue for avg speed in Download ResultTatsuhiro Tsujikawa2015-06-221-3/+4
|
* Rewrite Time with chronoTatsuhiro Tsujikawa2015-06-091-1/+1
|
* Replace timer facility with chrono libTatsuhiro Tsujikawa2015-06-091-5/+4
|
* Fixed some typos in code commentsDan Fandrich2015-01-161-1/+1
|
* Add --bt-detach-seed-only optionTatsuhiro Tsujikawa2014-10-141-2/+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-6/+4
|
* Fix use-after-free on exit with multi-file torrent download + DHTTatsuhiro Tsujikawa2014-06-081-31/+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.
* Save session only when there is change since the last serializationTatsuhiro Tsujikawa2014-05-311-0/+1
| | | | | | | | | | | | | This is a slight optimization not to cause useless disk access. This only applies to saving session automatically (see --save-session-interval). aria2.saveSession and serialization at the end of the session are always performed as before. When serialization, we first check that whether there is any change since the last serialization. To do this, we first calculate hash value of serialized content without writing into file. Then compare this value to the value of last serialization. If they do not match, perform serialization.
* Revert "Save session only when there is change since the last serialization"Tatsuhiro Tsujikawa2014-05-311-23/+2
| | | | This reverts commit 1944d8db58555c08b5f069a2e987fcfdd5aad997.
* Save session only when there is change since the last serializationTatsuhiro Tsujikawa2014-05-301-2/+23
| | | | | | | This is a slight optimization not to cause useless disk access. This only applies to saving session automatically (see --save-session-interval). aria2.saveSession and serialization at the end of the session are always performed as before.
* Add numStoppedTotal key to aria2.getGlobalStat() RPC method responseTatsuhiro Tsujikawa2014-02-151-1/+3
| | | | | | | It shows the number of stopped downloads in the current session and not capped by --max-download-result option. On the other hand, the existing numStopped key also shows the number of stopped downloads, but it is capped by --max-download-result option.
* Add --enable-color option to enable/disable terminal color outputTatsuhiro Tsujikawa2014-01-301-1/+1
|
* Fix bug that numOpenFile_ is not reduced when MultiDiskAdaptor is deletedTatsuhiro Tsujikawa2013-12-311-0/+6
| | | | This bug caused assertion error in RequestGroupMan::ensureMaxOpenFileLimit
* Limit number of opened file globally with --bt-max-open-files optionTatsuhiro Tsujikawa2013-11-171-3/+31
| | | | | | | | | | 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.
* Convert to autos and ranged loopsNils Maier2013-08-211-39/+27
|
* Convert most 0/NULL pointers to nullptrNils Maier2013-08-201-2/+2
| | | | Courtesy of llvm cpp11-migrate 3.3
* Always save control file if --force-save is givenTatsuhiro Tsujikawa2013-07-281-5/+5
|
* Use std::unique_ptr for Metalink objectsTatsuhiro Tsujikawa2013-07-121-2/+1
|
* Use std::unique_ptr for URISelector instead of std::shared_ptrTatsuhiro Tsujikawa2013-07-041-7/+5
|
* Wrap Command object in std::unique_ptrTatsuhiro Tsujikawa2013-06-231-13/+11
|
* Move RequestGroup vector from Context to RequestGroupManTatsuhiro Tsujikawa2013-06-231-1/+1
|
* Remove Triplet, use std::tuple insteadTatsuhiro Tsujikawa2013-06-221-21/+19
|
* Cleanup a2functional.hTatsuhiro Tsujikawa2013-06-221-1/+1
| | | | | | Remove mem_fun_sh in favor of std::mem_fun. Remove unused functions. Use std::mem_fn instead of mem_fun_sh
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-50/+50
|
* Add changePosition APITatsuhiro Tsujikawa2013-05-151-1/+1
|
* Refactor Notifier interface to accept DownloadEventListener interfaceTatsuhiro Tsujikawa2013-05-111-8/+8
| | | | | | | WebSocketSessionMan now implements DownloadEventListener and is added to Notifier. It becomes member variable of DownloadEngine. The event constant for download event is defined in aria2.h so that we can add event callback API later.
* Add sessionConfigSetKeepRunning and shutdown API functionTatsuhiro Tsujikawa2013-05-011-3/+3
| | | | | | Setting sessionConfigSetKeepRunning to true makes aria2 core keep running even if there is no download to perform, just like --enable-rpc option.
* Move initialization code in aria2::main to struct ContextTatsuhiro Tsujikawa2013-04-251-3/+2
|
* Use IndexedList::remove_if to clean up RequestGroupMan::removeStoppedGroupTatsuhiro Tsujikawa2013-03-031-66/+38
|
* Implement IndexedList::iteratorTatsuhiro Tsujikawa2013-03-031-28/+24
| | | | | It is dangerous to expose internal iterator to the outside, which is easily misused.
* Hygiene: Fix some clang warnings, mostly unused private members.Nils Maier2013-03-011-1/+1
|
* Fix infinite loop when size of downloadResults_ exceeds maxDownloadResult_Tatsuhiro Tsujikawa2013-02-251-0/+3
|
* Fix invalid iterator handling when deleting RequestGroupTatsuhiro Tsujikawa2013-02-031-5/+4
|
* Use std::deque instead of std::list in IndexedListTatsuhiro Tsujikawa2013-02-011-19/+24
| | | | We choose faster iteration over rare slower deletion in the middle.
* Simplified RequestGroupMan::fillRequestGroupFromReserverTatsuhiro Tsujikawa2012-12-221-23/+26
|
* Faster deletion of RequestGroup and DownloadResult listsTatsuhiro Tsujikawa2012-12-191-290/+127
|
* Use map to make DownloadResult lookup fastTatsuhiro Tsujikawa2012-12-161-6/+25
|