summaryrefslogtreecommitdiff
path: root/src/RequestGroupMan.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Use 64 bits random bytes as GIDTatsuhiro Tsujikawa2012-12-161-16/+15
| | | | | | | | | | 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.
* Console color outputTatsuhiro Tsujikawa2012-12-081-4/+47
| | | | Log level and download result string is now colored.
* Added --disk-cache optionTatsuhiro Tsujikawa2012-12-031-3/+17
| | | | | | | | | | 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.
* Fixed compile error without BitTorrent supportTatsuhiro Tsujikawa2012-12-011-0/+1
|
* Reworked download/upload statistics calculationTatsuhiro Tsujikawa2012-10-251-9/+4
| | | | | | | | | | | | | | 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.
* Use uri_split instead of uri::parse where appropriateTatsuhiro Tsujikawa2012-10-141-5/+9
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-3/+3
|