summaryrefslogtreecommitdiff
path: root/src/CheckIntegrityCommand.cc
Commit message (Collapse)AuthorAgeFilesLines
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-24/+24
|
* Use std::unique_ptr for CheckIntegrityEntry and FileAllocationEntryTatsuhiro Tsujikawa2013-07-061-7/+7
|
* Wrap Command object in std::unique_ptrTatsuhiro Tsujikawa2013-06-231-11/+7
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-1/+1
|
* Removed utf8ToNative from log message and exception message.Tatsuhiro Tsujikawa2011-08-081-6/+3
|
* In MinGW32, open file with UNICODE filename and print them in ANSI.Tatsuhiro Tsujikawa2011-08-041-3/+6
|
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-2/+2
| | | | | | | | Use format specifier %lld for cuid_t. Defined cuid_t as long long int instead of int64_t, since g++ complains int64_t is not suitable for %lld.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-12/+15
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-3/+0
| | | | | | | | | 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-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-5/+5
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-201-16/+10
| | | | | | | | | | | | | Use auto_delete_container to delete created Command when exception is thrown rather than deleting them in catch block. * src/AbstractCommand.cc * src/CheckIntegrityCommand.cc * src/DHTSetup.cc * src/FileAllocationCommand.cc * src/TrackerWatcherCommand.cc * src/a2functional.h
* 2010-06-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-091-15/+15
| | | | | | | | | Made protected member variable private. Added accessor funcs. * src/CheckIntegrityCommand.cc * src/FileAllocationCommand.cc * src/RealtimeCommand.h
* 2010-06-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-081-8/+12
| | | | | | | Made protected member variables of Command private. Added accessor funcs.
* 2010-06-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-081-4/+7
| | | | | | | Made public member variables of DownloadEngine private. Added accessor funcs.
* 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-111-0/+1
| | | | | | | | | | | Fixed the bug that hash check hangs when aria2.pause is issued while aria2 is checking piece hashes. Fixed the bug that the download is paused after file allocation completion even if aria2.pause is issued during file allocation. * src/CheckIntegrityCommand.cc * src/FileAllocationCommand.cc
* 2010-03-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-211-2/+4
| | | | | | | | Defined cuid_t as int64_t. Removed texts containing "CUID#%D" from translatable texts because it is used in log and debugging purpose.
* 2010-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-201-1/+1
| | | | | | Use cuid_t type for cuid.
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-3/+3
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.
* 2010-01-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-111-2/+14
| | | | | | | | | | | | | | Fixed memory leak. Commands stored in std::deque<Command*> are not deleted when exception is thrown. Make sure that when passing std::deque<Command*> to function to store Commands, handle exception and delete these Commands. * src/AbstractCommand.cc * src/CheckIntegrityCommand.cc * src/FileAllocationCommand.cc * src/RequestGroup.cc * src/TrackerWatcherCommand.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-4/+4
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-10-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-10-051-1/+4
| | | | | | | | | | | | | | | | Don't save control file when aria2 exists while checking piece hash(behavior of -V option). If control file doesn't exist when aria2 launched, the completed length in saved control file will be 0 byte and this confuses user. disableSaveControlFile() is called in RequestGroup::processCheckIntegrityEntry(). enableSaveControlFile() will be called after hash checking is done. See CheckIntegrityCommand. * src/CheckIntegrityCommand.cc * src/RequestGroup.cc * src/RequestGroup.h * src/RequestGroupMan.cc
* 2009-06-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-06-281-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewritten DownloadContext and removed SingleFileDownloadContext and BtContext and its derived classes. BitTorrent specific attributes are now set by DownloadContext::setAttribute() with key bittorrent::BITTORRENT. * src/AbstractBtMessage.cc * src/AbstractBtMessage.h * src/AbstractCommand.cc * src/AbstractCommand.h * src/AbstractProxyRequestCommand.cc * src/AbstractProxyResponseCommand.cc * src/ActivePeerConnectionCommand.cc * src/ActivePeerConnectionCommand.h * src/AnnounceList.cc * src/BtCheckIntegrityEntry.cc * src/BtConstants.h * src/BtContext.h: Removed * src/BtDependency.cc * src/BtExtendedMessage.cc * src/BtPieceMessage.cc * src/BtPieceMessage.h * src/BtPostDownloadHandler.cc * src/BtRegistry.cc * src/BtRegistry.h * src/BtSetup.cc * src/CheckIntegrityCommand.cc * src/CheckIntegrityEntry.cc * src/ChecksumCheckIntegrityEntry.cc * src/ConsoleStatCalc.cc * src/ContentTypeRequestGroupCriteria.cc * src/DHTGetPeersCommand.cc * src/DHTGetPeersCommand.h * src/DHTPeerLookupTask.cc * src/DHTPeerLookupTask.h * src/DHTTaskFactory.h * src/DHTTaskFactoryImpl.cc * src/DHTTaskFactoryImpl.h * src/DefaultBtAnnounce.cc * src/DefaultBtAnnounce.h * src/DefaultBtContext.cc: Removed * src/DefaultBtContext.h: Removed * src/DefaultBtInteractive.cc * src/DefaultBtInteractive.h * src/DefaultBtMessageDispatcher.cc * src/DefaultBtMessageDispatcher.h * src/DefaultBtMessageFactory.cc * src/DefaultBtMessageFactory.h * src/DefaultBtMessageReceiver.cc * src/DefaultBtMessageReceiver.h * src/DefaultBtProgressInfoFile.cc * src/DefaultBtRequestFactory.cc * src/DefaultBtRequestFactory.h * src/DefaultExtensionMessageFactory.cc * src/DefaultExtensionMessageFactory.h * src/DefaultPeerStorage.cc * src/DefaultPeerStorage.h * src/DefaultPieceStorage.cc * src/DefaultSegmentManFactory.cc * src/DiskAdaptor.cc * src/DiskAdaptor.h * src/DownloadContext.cc * src/DownloadContext.h * src/DownloadEngine.cc * src/DownloadEngineFactory.cc * src/DownloadHandler.cc * src/DownloadResult.h * src/FileAllocationCommand.cc * src/FileAllocationDispatcherCommand.cc * src/FileAllocationEntry.cc * src/FileEntry.h * src/FillRequestGroupCommand.cc * src/FtpDownloadCommand.cc * src/FtpFinishDownloadCommand.cc * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc * src/FtpTunnelRequestCommand.cc * src/FtpTunnelResponseCommand.cc * src/HandshakeExtensionMessage.cc * src/HandshakeExtensionMessage.h * src/HaveEraseCommand.cc * src/HttpDownloadCommand.cc * src/HttpInitiateConnectionCommand.cc * src/HttpProxyRequestCommand.cc * src/HttpProxyResponseCommand.cc * src/HttpRequest.cc * src/HttpRequest.h * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/HttpServerBodyCommand.cc * src/HttpServerCommand.cc * src/HttpSkipResponseCommand.cc * src/InitiateConnectionCommandFactory.cc * src/InitiatorMSEHandshakeCommand.cc * src/InitiatorMSEHandshakeCommand.h * src/IteratableChecksumValidator.cc * src/IteratableChecksumValidator.h * src/IteratableChunkChecksumValidator.cc * src/MSEHandshake.cc * src/MSEHandshake.h * src/Makefile.am * src/Makefile.in * src/Metalink2RequestGroup.cc * src/MetalinkPostDownloadHandler.cc * src/MultiDiskAdaptor.cc * src/MultiDiskAdaptor.h * src/MultiFileAllocationIterator.cc * src/MultiUrlRequestInfo.cc * src/PeerChokeCommand.cc * src/PeerChokeCommand.h * src/PeerInitiateConnectionCommand.cc * src/PeerInitiateConnectionCommand.h * src/PeerInteractionCommand.cc * src/PeerInteractionCommand.h * src/PeerReceiveHandshakeCommand.cc * src/PieceHashCheckIntegrityEntry.cc * src/RealtimeCommand.cc * src/ReceiverMSEHandshakeCommand.cc * src/RequestGroup.cc * src/RequestGroup.h * src/RequestGroupEntry.cc * src/RequestGroupMan.cc * src/SeedCheckCommand.cc * src/SeedCheckCommand.h * src/SegmentMan.cc * src/ShareRatioSeedCriteria.h * src/SingleFileDownloadContext.cc: Removed * src/SingleFileDownloadContext.h: Removed * src/SleepCommand.cc * src/StreamCheckIntegrityEntry.cc * src/TrackerWatcherCommand.cc * src/TrackerWatcherCommand.h * src/UnknownLengthPieceStorage.cc * src/Util.cc * src/Util.h * src/XmlRpcMethodImpl.cc * src/bittorrent_helper.cc * src/bittorrent_helper.h * src/download_helper.cc * src/main.cc * src/option_processing.cc * test/BitfieldManTest.cc * test/BittorrentHelperTest.cc * test/BtCancelMessageTest.cc * test/BtChokeMessageTest.cc * test/BtDependencyTest.cc * test/BtPieceMessageTest.cc * test/BtPostDownloadHandlerTest.cc * test/BtRegistryTest.cc * test/BtRejectMessageTest.cc * test/BtRequestMessageTest.cc * test/DHTPeerAnnounceStorageTest.cc * test/DefaultBtAnnounceTest.cc * test/DefaultBtContextTest.cc: Removed * test/DefaultBtMessageDispatcherTest.cc * test/DefaultBtMessageFactoryTest.cc * test/DefaultBtProgressInfoFileTest.cc * test/DefaultBtRequestFactoryTest.cc * test/DefaultExtensionMessageFactoryTest.cc * test/DefaultPeerStorageTest.cc * test/DefaultPieceStorageTest.cc * test/DirectDiskAdaptorTest.cc * test/DownloadContextTest.cc * test/DownloadHandlerFactoryTest.cc * test/DownloadHelperTest.cc * test/HandshakeExtensionMessageTest.cc * test/HttpRequestTest.cc * test/HttpResponseTest.cc * test/IteratableChecksumValidatorTest.cc * test/IteratableChunkChecksumValidatorTest.cc * test/MSEHandshakeTest.cc * test/Makefile.am * test/Makefile.in * test/Metalink2RequestGroupTest.cc * test/MetalinkPostDownloadHandlerTest.cc * test/MockBtContext.h: Removed * test/MockDHTTaskFactory.h * test/MockDownloadContext.h: Removed * test/MockPieceStorage.h * test/MultiDiskAdaptorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/RequestGroupManTest.cc * test/RequestGroupTest.cc * test/SegmentManTest.cc * test/ShareRatioSeedCriteriaTest.cc * test/SingleFileDownloadContextTest.cc: Removed * test/UtilTest.cc * test/XmlRpcMethodTest.cc
* 2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-01-241-10/+10
| | | | | | | | | | | | | | | | | | | | Made (piece) hash check sequential for each RequestGroup because simultaneous hash check is slower than sequential execution. * src/CheckIntegrityCommand.cc * src/CheckIntegrityDispatcherCommand.cc * src/CheckIntegrityDispatcherCommand.h * src/CheckIntegrityMan.h * src/ConsoleStatCalc.cc * src/DownloadCommand.cc * src/DownloadEngine.cc * src/DownloadEngine.h * src/DownloadEngineFactory.cc * src/Makefile.am * src/Makefile.in * src/RequestGroup.cc * src/StatCalc.h
* 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-271-1/+1
| | | | | | | | | | | | | Rewritten Exception class. Throw exception object, not its pointer and catch by reference, so that remove problematic delete operator for catched exception. * src/Exception.cc * src/Exception.h * test/ExceptionTest.cc * src/*: All files throwing/catching exception. * test/*: All files throwing/catching exception.
* 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates the time lag between sequential downloads and commands in the same RequestGroup. In old implementation, aria2 occasionally waits 1 seconds before executing next command or RequestGroup. This is really a waste of time, and new implementation eliminates this unnecessary time lag. * src/AbstractCommand.cc * src/AutoSaveCommand.cc * src/CheckIntegrityCommand.cc * src/Command.{cc, h} * src/DownloadEngine.{cc, h} * src/DownloadEngineFactory.cc * src/FileAllocationCommand.cc * src/FileAllocationDispatcherCommand.cc * src/FillRequestGroupCommand.cc * src/FtpInitiateConnectionCommand.cc * src/HaveEraseCommand.cc * src/HttpInitiateConnectionCommand.cc * src/HttpResponseCommand.cc * src/RealtimeCommand.cc * src/RequestGroup.cc * src/RequestGroupMan.cc * src/StreamFileAllocationEntry.cc * src/TimeBasedCommand.{cc, h} * src/TimedHaltCommand.cc
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-4/+6
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented checksum validation feature(1 checksum for each file) The validation takes place after the download. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class. * src/IteratableChecksumValidator.{h, cc}: Rewritten. * src/CheckIntegrityCommand.cc: Changed log message. * src/Metalink2RequestGroup.cc: Set checksum to SingleFileDownloadContext. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from PieceHashCheckIntegrity class. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from PieceHashCheckIntegrity class. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class. * src/IteratableValidator.h: New class. * src/message.h * src/CheckIntegrityEntry.{h, cc} * src/IteratableChunkChecksumValidator.{h, cc} * src/SingleFileDownloadContext.h * src/DownloadCommand.cc --allow-overwrite=true is no longer needed to check file integrity before download in BitTorrent download. * src/RequestGroup.cc (getInitialCommand) Removed RequestGroup from queue when RequestGroup::getInitialCommand() throws exception. * src/RequestGroupMan.cc (getInitialCommands)
* 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't connect server before checking file integrity at startup, if filesize and output file path are known. * src/AbstractCommand.cc * src/StreamFileAllocationEntry.cc * src/Metalink2RequestGroup.cc * src/RequestGroup.{h, cc} * src/HttpResponseCommand.cc * src/FtpNegotiationCommand.cc Added DownloadFailureException. If it is thrown, RequestGroup should halt. * src/AbstractCommand.cc * src/DownloadFailureException.h * src/RequestGroup.cc Catch RecoverableException, instead of DlAbortEx. * src/RequestGroupMan.cc * src/FillRequestGroupCommand.cc * src/MetaFileUtil.cc * src/IteratableChunkChecksumValidator.cc Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup:: getGID()) * src/CheckIntegrityCommand.cc * src/message.h Print gid instead of idx. * src/RequestGroupMan.cc Removed exception throwers declaration. * src/DirectDiskAdaptor.{h, cc} * src/SocketCore.{h, cc} * src/MultiDiskAdaptor.{h, cc} * src/HttpConnection.{h, cc} * src/HttpResponse.{h, cc} * src/DiskAdaptor.{h, cc} * src/CopyDiskAdaptor.{h, cc} * src/MultiDiskAdaptor.{h, cc} * src/HttpHeaderProcessor.{h, cc} * src/AbstractSingleDiskAdaptor.{h, cc} * src/Util.{h, cc} * test/UtilTest.cc * src/DefaultDiskWriter.{h, cc} * src/FtpConnection.{h, cc} * src/AbstractDiskWriter.{h, cc} Removed duplicate code. * src/StreamCheckIntegrityEntry.cc Removed unnecessary include. * src/DiskWriter.h Included Exception.h * src/option_processing.cc Included 2 files and added doc * src/TrackerWatcherCommand.cc * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
* 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-081-1/+2
| | | | | | | | | | | | | | | | | | | Changed CheckIntegrityEntry interface so that it can define the action when all the chunk checksums are valid. * src/CheckIntegrityEntry.h * src/StreamCheckIntegrityEntry.{h, cc} * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums are valid, then aira2 goes to seeding mode. Sometimes it is better to exit rather than doing seeding. So, it would be good to toggle this behavior. * src/CheckIntegrityCommand.cc * src/AbstractCommand.cc * src/RequestGroup.cc
* 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-111-21/+9
| | | | | | | | | | 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.
* 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fixed the bug that prevents cookies from being sent to the server if the domain of cookie is FQDN and starts with ".". * src/Cookie.cc (match) To add the ability to change peer id. * src/DefaultBtContext.h (_peerIdPrefix): New variable (setPeerIdPrefix): New function. * src/torrentRequestInfo.cc (execute): Set the option value of PREF_PEER_ID_PREFIX to DefaultBtContext. * src/main.cc (main): Added peer-id-prefix command-line option. The usage message is not added yet. * src/DefaultBtContext.cc (generatePeerId): Use _peerIdPrefix. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
* Fixed invalid connection countTatsuhiro Tsujikawa2007-07-051-2/+1
|
* 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/AbstractCommand.cc (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and MSG_MAX_TRY from error to info. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY. * src/message.h (MSG_TORRENT_DOWNLOAD_ABORTED): New definition. (MSG_DOWNLOAD_ABORTED): Added %s. (MSG_RESTARTING_DOWNLOAD): Added %s. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated. * src/PeerAbstractCommand.cc (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED * src/Request.h (cookieBox): Made ShardHandle. * src/RequestGroup.h, src/RequestGroup.cc (createNextCommandWithAdj): New function. * src/FileAllocationCommand.cc (executeInternal): Use createNextCommandWithAdj(). * src/CheckIntegrityCommand.cc (executeInternal): Use createNextCommandWithAdj(). Added --load-cookies command-option. * src/OptionHandlerFactory.cc (createOptionHandlers): Added PREF_LOAD_COOKIES. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser. Now aria2 can handle cookie's expiration date. * src/Cookie.h (expires): Changed its type to time_t. * src/main.cc: Added --load-cookies command-line option. * src/prefs.h (PREF_LOAD_COOKIES): New definition. * src/Util.h, src/Util.cc (httpGMT): New function. * src/Request.cc (Request): Initialize cookieBox using CookieBoxFactory. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class. * src/CookieParser.h, src/CookieParser.cc: New class. * src/main.cc: Chagned the default value of --metalink-servers to 5. * src/HttpResponseCommand.cc (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
* 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-06-051-20/+20
| | | | | | | | Make download size shown in MB, KB. * src/ConsoleDownloadEngine.h (sendStatistics) * src/Util.h, srcUtil.cc (abbrevSize): New function.
* 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-06-031-2/+1
| | | | | | | | | | | | | | | | | | | | | RequestGroup::getNextCommand() was renamed to createNextCommand(). Added its overloaded method. * src/RequestGroup.h (_numConcurrentCommand): New variable. (setNumConcurrentCommand): New function. * src/RequestGroup.cc Abort download if same file is being downloaded concurrently. * src/RequestGroup.h, src/RequestGroupMan.cc (isSameFileBeingDownloaded): New function. * src/HttpResponseCommand.cc (executeInternal) * src/FtpNegotiateCommand.cc (recvSize) * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition. * main.cc: Added help message for -i option.
* 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-05-311-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/FileAllocationCommand.cc: Derived from RealtimeCommand. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand. * src/MetalinkEntry.h (checksum): Changed to ChecksumHandle * src/MetalinkRequestInfo.cc (checksum): Changed to ChecksumHandle * src/File.cc (mkdirs): OPEN_MODE -> DIR_OPEN_MODE * src/common.h (DIR_OPEN_MODE): New definition * src/RequestGroup.cc (prepareForNextAction): Added an argument. * src/message.h (MSG_GOOD_CHECKSUM): New definition (MSG_BAD_CHECKSUM): New definition * src/HttpResponseCommand.cc (handleDefaultEncoding): Continue download sequence in new non-segmented download. * src/FileAllocationEntry.h (_nextDownloadCommand): New variable. * src/DownloadCommand.cc (prepareForNextSegment): Create ChecksumCommand if checksum is available. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class. * src/IteratableChecksumValidator.h, src/IteratableChecksumValidator.cc: New class. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
* New filesTatsuhiro Tsujikawa2007-05-201-0/+90