summaryrefslogtreecommitdiff
path: root/src/BtFileAllocationEntry.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix regression in bfc54d0b9a694e5d87efd8ed11b5393bc4b66f93Tatsuhiro Tsujikawa2017-05-201-5/+7
| | | | Don't save control file if --auto-save-interval is 0.
* Save control file earlyTatsuhiro Tsujikawa2017-03-021-0/+7
|
* RefactorTatsuhiro Tsujikawa2017-03-021-13/+13
|
* Use default where possibleNils Maier2016-08-291-1/+1
|
* Add --max-mmap-limit optionTatsuhiro Tsujikawa2016-01-291-1/+3
| | | | | | | | Set the maximum file size to enable mmap (see --enable-mmap option). The file size is determined by the sum of all files contained in one download. For example, if a download contains 5 files, then file size is the total size of those files. If file size is strictly greater than the size specified in this option, mmap will be disabled.
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-15/+18
|
* Don't enable mmap if file allocation is disabledTatsuhiro Tsujikawa2015-11-121-3/+5
| | | | | | | Without file allocation, we cannot map file because file length could be zero. This could fix bug reported at GH-478
* Use std::begin and std::endTatsuhiro Tsujikawa2015-06-111-1/+1
|
* Add --bt-detach-seed-only optionTatsuhiro Tsujikawa2014-10-141-0/+1
| | | | | | | | | | 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.
* Convert most 0/NULL pointers to nullptrNils Maier2013-08-201-1/+1
| | | | Courtesy of llvm cpp11-migrate 3.3
* Wrap Command object in std::unique_ptrTatsuhiro Tsujikawa2013-06-231-1/+1
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-2/+2
|
* mingw32: Re-open files with read-only mode enabled on seedingTatsuhiro Tsujikawa2012-12-241-0/+17
| | | | | | | On Mingw32 build, if aria2 opens file with GENERIC_WRITE access right, some programs cannot open the file aria2 is seeding. To avoid this situation, re-open files with read-only enabled when seeding is about to begin.
* Added --enable-mmap option.Tatsuhiro Tsujikawa2012-06-241-0/+7
| | | | | If this option is used, map files into memory using mmap(2). This option is experimental.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-3/+1
| | | | | | | | | Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts.
* 2010-07-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-101-0/+2
| | | | | | | | | | | Fixed the bug that DownloadContext::resetDownloadStartTime() never be called in downloads whose total length is unknown. This causes avg speed in Download Results is always 0 for these downloads. * src/RequestGroup.cc * src/BtFileAllocationEntry.cc * src/StreamFileAllocationEntry.cc
* 2010-06-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-091-6/+8
| | | | | | | | | | | | | | | | Made protected member variable private. Added accessor funcs. * src/BtCheckIntegrityEntry.cc * src/BtFileAllocationEntry.cc * src/CheckIntegrityEntry.cc * src/CheckIntegrityEntry.h * src/ChecksumCheckIntegrityEntry.cc * src/FileAllocationEntry.cc * src/PieceHashCheckIntegrityEntry.cc * src/RequestGroupEntry.h * src/StreamCheckIntegrityEntry.cc * src/StreamFileAllocationEntry.cc
* 2010-06-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-081-0/+3
| | | | | | | Made public member variables of DownloadEngine private. Added accessor funcs.
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-2/+2
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-2/+2
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-041-1/+5
| | | | | | | | | | | | Call RequestGroup::createNextCommandWithAdj() from BtFileAllocationEntry if at least one FileEntry has URI. The static function hasAssociatedUri in RequestGroup.cc is renamed as isUriSuppliedForRequsetFileEntry() and placed in FileEntry.h. * src/BtFileAllocationEntry.cc * src/FileEntry.h * src/RequestGroup.cc
* 2009-05-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now RequestGroup has its own copy of Option object. This will help to give custom option for each RequestGroup. addTorrentFile command now takes options. * src/AbstractCommand.cc * src/AbstractCommand.h * src/AbstractProxyRequestCommand.cc * src/ActivePeerConnectionCommand.cc * src/ActivePeerConnectionCommand.h * src/AdaptiveURISelector.cc * src/BtCheckIntegrityEntry.cc * src/BtDependency.cc * src/BtDependency.h * src/BtFileAllocationEntry.cc * src/BtPostDownloadHandler.cc * src/CheckIntegrityEntry.cc * src/DownloadCommand.cc * src/FtpDownloadCommand.cc * src/FtpFinishDownloadCommand.cc * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc * src/HttpInitiateConnectionCommand.cc * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc * src/InitiateConnectionCommand.cc * src/InitiateConnectionCommandFactory.cc * src/InitiatorMSEHandshakeCommand.cc * src/InitiatorMSEHandshakeCommand.h * src/Metalink2RequestGroup.cc * src/Metalink2RequestGroup.h * src/MetalinkPostDownloadHandler.cc * src/MultiUrlRequestInfo.cc * src/MultiUrlRequestInfo.h * src/PeerAbstractCommand.cc * src/PeerInteractionCommand.cc * src/PeerInteractionCommand.h * src/PeerReceiveHandshakeCommand.cc * src/PeerReceiveHandshakeCommand.h * src/RequestGroup.cc * src/RequestGroup.h * src/TrackerWatcherCommand.cc * src/TrackerWatcherCommand.h * src/XmlRpcMethod.cc * src/XmlRpcMethod.h * src/XmlRpcMethodImpl.cc * src/download_helper.cc * src/download_helper.h * src/main.cc * test/BtDependencyTest.cc * test/BtPostDownloadHandlerTest.cc * test/DefaultBtMessageDispatcherTest.cc * test/DownloadHandlerFactoryTest.cc * test/DownloadHelperTest.cc * test/Metalink2RequestGroupTest.cc * test/MetalinkPostDownloadHandlerTest.cc * test/RequestGroupManTest.cc * test/RequestGroupTest.cc
* 2008-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-11-101-1/+5
| | | | | | | | | | | | | | Show an average download speed in Download results. * src/BtFileAllocationEntry.cc * src/DefaultPieceStorage.cc * src/DownloadContext.cc * src/DownloadContext.h * src/DownloadResult.h * src/RequestGroup.cc * src/RequestGroupMan.cc * src/StreamFileAllocationEntry.cc
* 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-111-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass std::deque<Command*> by reference to avoid unnecessary coping. * src/AbstractCommand.cc * src/BtCheckIntegrityEntry.cc * src/BtCheckIntegrityEntry.h * src/BtFileAllocationEntry.cc * src/BtFileAllocationEntry.h * src/BtSetup.cc * src/BtSetup.h * src/CheckIntegrityCommand.cc * src/CheckIntegrityEntry.h * src/ChecksumCheckIntegrityEntry.cc * src/ChecksumCheckIntegrityEntry.h * src/DHTSetup.cc * src/DHTSetup.h * src/DownloadEngine.cc * src/FileAllocationCommand.cc * src/FileAllocationEntry.h * src/RequestGroup.cc * src/RequestGroup.h * src/RequestGroupMan.cc * src/RequestGroupMan.h * src/StreamCheckIntegrityEntry.cc * src/StreamCheckIntegrityEntry.h * src/StreamFileAllocationEntry.cc * src/StreamFileAllocationEntry.h * src/TrackerWatcherCommand.cc * src/a2functional.h
* 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Added std namespace to copy, remove_copy, back_inserter, front_inserter. * src/RequestGroupMan.cc * src/DefaultPieceStorage.cc * src/StreamFileAllocationEntry.cc * src/BtFileAllocationEntry.cc * src/RequestGroup.cc * src/MetalinkEntry.cc * src/DelegatingPeerListProcessor.cc * src/DefaultBtRequestFactory.cc * src/DefaultBtMessageDispatcher.cc * src/version_usage.cc: Included <algorithm> * src/main.cc * src/MetalinkParserController.cc * src/DefaultBtContext.cc * src/DownloadEngineFactory.cc * src/a2algo.h Removed. * test/StreamUriListParserTest.cc
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-0/+4
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-241-3/+4
| | | | | | | | | | Fixed: compilation fails without c-ares/ares * src/DownloadEngine.cc (addCommand): Moved outside #ifdef Generate http/ftp commands only when download is incomplete. * src/BtFileAllocationEntry.cc (prepareForNextAction)
* 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-111-0/+53
Implemented BitTorrent/http/ftp integrated download. I've rewritten lots of files and now some headers have forward class declarations to reduce compile time. The implementation is extremely alpha stage, I recommend to use this for testing purpose only.