Tatsuhiro Tsujikawa
20e215047c
2009-05-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added source filename(__FILE__) and line number(__LINE__) to
exception message.
* src/AbstractCommand.cc
* src/AbstractDiskWriter.cc
* src/AbstractProxyResponseCommand.cc
* src/BDE.h
* src/BtAllowedFastMessage.cc
* src/BtHandshakeMessageValidator.h
* src/BtHaveAllMessage.cc
* src/BtHaveNoneMessage.cc
* src/BtPieceMessage.cc
* src/BtRejectMessage.cc
* src/ChunkedDecoder.cc
* src/CookieStorage.cc
* src/DHTAnnouncePeerMessage.cc
* src/DHTEntryPointNameResolveCommand.cc
* src/DHTMessageFactoryImpl.cc
* src/DHTMessageTracker.cc
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* src/DHTSetup.cc
* src/DHTTokenTracker.cc
* src/DefaultBtAnnounce.cc
* src/DefaultBtContext.cc
* src/DefaultBtInteractive.cc
* src/DefaultBtMessageFactory.cc
* src/DefaultBtProgressInfoFile.cc
* src/DefaultExtensionMessageFactory.cc
* src/DlAbortEx.h
* src/DlRetryEx.h
* src/DownloadCommand.cc
* src/DownloadEngineFactory.cc
* src/DownloadFailureException.h
* src/Exception.cc
* src/Exception.h
* src/ExpatMetalinkProcessor.cc
* src/ExpatXmlRpcRequestProcessor.cc
* src/FallocFileAllocationIterator.cc
* src/FatalException.h
* src/FtpConnection.cc
* src/FtpFinishDownloadCommand.cc
* src/FtpInitiateConnectionCommand.cc
* src/FtpNegotiationCommand.cc
* src/GZipDecoder.cc
* src/HandshakeExtensionMessage.cc
* src/HttpConnection.cc
* src/HttpHeaderProcessor.cc
* src/HttpInitiateConnectionCommand.cc
* src/HttpResponse.cc
* src/HttpResponseCommand.cc
* src/HttpServer.cc
* src/HttpSkipResponseCommand.cc
* src/InitiateConnectionCommandFactory.cc
* src/IteratableChunkChecksumValidator.cc
* src/LibgcryptARC4Context.h
* src/LibgcryptARC4Decryptor.h
* src/LibgcryptARC4Encryptor.h
* src/LibgcryptDHKeyExchange.h
* src/LibgnutlsTLSContext.cc
* src/LibsslARC4Context.h
* src/LibsslARC4Decryptor.h
* src/LibsslARC4Encryptor.h
* src/LibsslDHKeyExchange.h
* src/LibsslTLSContext.cc
* src/MSEHandshake.cc
* src/MessageDigestHelper.cc
* src/MetalinkHelper.cc
* src/MultiDiskAdaptor.cc
* src/NameMatchOptionHandler.h
* src/NameResolver.cc
* src/Netrc.cc
* src/NsCookieParser.cc
* src/OptionHandlerException.cc
* src/OptionHandlerException.h
* src/OptionHandlerImpl.h
* src/OptionParser.cc
* src/ParameterizedStringParser.cc
* src/PeerAbstractCommand.cc
* src/PeerConnection.cc
* src/PeerMessageUtil.cc
* src/PeerReceiveHandshakeCommand.cc
* src/Platform.cc
* src/ReceiverMSEHandshakeCommand.cc
* src/RecoverableException.h
* src/RequestGroup.cc
* src/SimpleLogger.cc
* src/SocketCore.cc
* src/Sqlite3MozCookieParser.cc
* src/UTPexExtensionMessage.cc
* src/Util.cc
* src/XML2SAXMetalinkProcessor.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/XmlRpcMethodImpl.cc
* src/bencode.cc
* src/download_helper.cc
* src/messageDigest.h
* test/ExceptionTest.cc
* test/TestUtil.cc
2009-05-18 15:07:15 +00:00
Tatsuhiro Tsujikawa
d791807add
2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Added gzip, deflate decoding support in HTTP using libz. If
compiled
with this feature, aria2 sends "Accept-Encoding: deflate, gzip"
header
to a HTTP server. If a server returns "Content-Encoding: gzip"
or
"Content-Encoding: deflate" then, aria2 decodes the response
body on the
fly and writes decoded data to a local disk.
* README
* README.html
* configure.ac
* m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE,
they are
wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
* m4/libz.m4
* src/Decoder.h
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/Exception.h
* src/GZipDecoder.cc
* src/GZipDecoder.h
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpResponse.cc
* src/HttpResponse.h
* src/HttpResponseCommand.cc
* src/Makefile.am
* test/GZipDecoderTest.cc
* test/HttpRequestTest.cc
* test/HttpResponseTest.cc
* test/Makefile.am
* test/Makefile.in
* test/gzip_decode_test.gz
2008-06-29 14:29:36 +00:00
Tatsuhiro Tsujikawa
1ef99931e1
2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
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-27 02:22:14 +00:00
Tatsuhiro Tsujikawa
1b7c198289
2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Removed "using namespace std;" from all sources. Appended std::
prefix to c++
standard classes.
Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00
Tatsuhiro Tsujikawa
c9e3d51054
2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Preallocate non-requested file which is adjacent forward to
requested
file('requested' files means the files given in --select-file
option)
if they share a same piece.
This fixes long pause in the file system which doesn't support
sparse
files like FAT32 while downloading.
* src/MultiFileAllocationIterator.{h, cc}
* test/MultiFileAllocationIteratorTest.cc
* src/FileEntry.{h, cc}
Removed unused _option.
* src/MultiDiskAdaptor.h
* test/MultiDiskAdaptorTest.cc
* src/DefaultPieceStorage.cc
Set the default value of --seed-ratio to 1.0.
If 0.0 is given, then seeding continues regardless of share
ratio.
* src/version_usage.cc
* src/option_processing.cc
* src/BtSetup.cc
* doc/aria2c.1.txt
* doc/aria2c.1
Fixed: Selective download is not working in BitTorrent
* src/RequestGroup.cc
Introduced Sequence class. Use this instead of
Util::unfoldRange()
* src/PieceStorage.h
* test/MockPieceStorage.h
* src/UnknownLengthPieceStorage.h
* src/DefaultPieceStorage.{h, cc}
* src/Metalink2RequestGroup.cc
* src/RequestGroup.cc
* src/Sequence.h
* test/SequenceTest.cc
* src/IntSequence.h
* src/message.h
* src/Util.{h, cc}
* test/UtilTest.cc
Added new function 'parse' to catch exception thrown by
subclass's
parseArg
* src/OptionHandler.h
* src/OptionParser.cc
* src/NameMatchOptionHandler.h
* src/OptionHandlerImpl.h
* test/OptionHandlerTest.cc
Added IntegerRangeOptionHandler. Used for --listen-port and
--select-file. Now --listen-port accepts range of port.
* src/OptionHandlerFactory.cc
* src/version_usage.cc
* src/OptionHandlerImpl.h
* src/option_processing.cc
* src/BtSetup.cc
* src/PeerListenCommand.{h, cc}
* doc/aria2c.1.txt
* doc/aria2c.1
Implemented operator< for Exception class to provide easy way to
print
exception stack trace.
* src/Exception.{h, cc}
* src/main.cc
* src/option_processing.cc
2007-11-21 16:14:40 +00:00
Tatsuhiro Tsujikawa
d28e6aca15
2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
To add RecoverableException, FatalException:
* src/AbstractCommand.cc
(onAbort): Exception -> RecoverableException
* src/PeerAbstractCommand.h
(RecoverableException.h): New include.
(onAbort): Exception -> RecoverableException.
* src/PeerInteractionCommand.cc
(onAbort): Exception -> RecoverableException.
* src/PeerAbstractCommand.cc
(execute): Exception -> RecoverableException.
(onAbort): Exception -> RecoverableException.
* src/TorrentRequestInfo.cc
(execute): Exception -> RecoverableException.
* src/MetalinkRequestInfo.cc
(execute): Exception -> RecoverableException.
* src/MetaFileUtil.cc: RecoverableException.
* src/AbstractCommand.h
(onAbort): Exception -> RecoverableException.
* src/DlRetryEx.h: Exception -> RecoverableException.
* src/DlAbortEx.h: Exception -> RecoverableException.
* src/PeerListenCommand.cc: Exception -> RecoverableException.
* src/Util.cc: Exception -> RecoverableException.
* src/DefauldDiskWriter.cc: Exception -> RecoverableException.
* src/TrackerUpdateCommand.cc: Exception ->
RecoverableException.
* src/UrlRequestInfo.cc: Exception -> RecoverableException.
To make ID static const int
* src/BtInterestedMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtPieceMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtChokeMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtHaveAllMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtKeepAliveMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtHandshakeMessage.h
(ID): New variable.
(getId): Made non-const.
* src/BtSuggestPieceMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtPortMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/AbstractBtMessage.h
(id): Removed.
(AbstractBtMessage): Removed id.
(getId): Removed.
* src/BtHaveMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtAllowedFastMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtCancelMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtNotInterestedMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtChokeMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtRejectMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtBitfieldMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtUnchokeMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtRequestMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
* src/BtHaveMessage.h
(ID_t): Removed.
(ID): New variable.
(getId): Made non-const.
To add --force-truncate command-line option and a check whether
the file already exists:
* src/DirectDiskAdaptor.h
(getFilePath): Made virtual public.
* src/MultiDiskAdaptor.h
(File.h): New include.
(DiskWriterEntry::fileEntry): Made private.
(DiskWriterEntry::fileExists): New function.
(DiskWriterEntry::getFileEntry): New function.
(fileExists): New function.
(getFilePath): New function.
* src/TorrentRequestInfo.cc
(FatalException.h): New include.
(message.h): New include.
(RecoverableException.h): New include.
(execute): Added a check whether file is already exists or not.
* src/DiskAdaptor.h
(fileExists): New function.
(getFilePath): New function.
* src/main.cc
(showUsage): Added an explanation of --force-truncate
command-line
option.
(main): Added --force-truncate command-line option.
* src/Exception.h
(setMsg): buf[256] -> buf[1024]
* src/CopyDiskWriter.h
(getFilePath): Made public virtual.
* src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
(fileExists): New function.
* src/DownloadEngineFactory.cc
(newTorrentConsoleEngine): Don't open file here.
* src/message.h
(EX_FILE_ALREADY_EXISTS): New definition.
* src/prefs.h
(PREF_FOECE_TRUNCATE): New definition.
* src/HttpResponseCommand.cc
(handleDefaultEncoding): Added a check whether the file already
exists.
* src/SegmentMan.h
(fileExists): New function.
(shouldCancelDownloadForSafety): New function.
* src/FtpNegotiateCommand.cc
(recvSize): Added a check whether the file already exists.
* src/AbstractSingleDiskAdaptor.cc
(File.h): New include.
(fileExists): New function.
* src/AbstractSingleDiskAdaptor.h
(getFilePath): Removed.
(fileExists): New function.
* src/SegmentMan.cc
(fileExists): New function.
(shouldCancelDownloadForSafety): New function.
To fix regression bug in torrent downloading:
* src/DefaultBtRequestFactory.cc
(doChokedAction): New function.
* src/DefaultBtRequestFactory.h
(doChokedAction): New function.
* src/DefaultBtMessageDispatcher.cc
(doChokedAction): Do not delete request if its target is in
allowed
fast set.
* src/DefaultBtInteractive.cc
(doPostHandshakeProcessing): Added a call to
sendPendingMessage().
(sendKeepAlive): Send keep alive message even if the outgoing
message
queue is not empty.
(decideInterest): Simplified the code.
(fillPiece): Remove a call to dispatcher->doChokedAction()
because
it is already called when BtChokeMessage is received from a
peer.
* src/BtRequestFactory.h
(doChokedAction): New function.
To clean up code:
* src/PeerInteractionCommand.h
(executeInternal): Added virtual keyword explicitly.
(prepareForRetry): Added virtual keyword explicitly.
(prepareForNextPeer): Added virtual keyword explicitly.
(onAbort): Added virtual keyword explicitly.
* src/RequestSlot.cc
(isTimeout): Use Time::elapsed() instead of
differenceInMillis().
* src/BtPieceMessage.cc
(doReceivedAction): Added a debug log of piece's bitfield.
* src/Piece.h
(getBitfieldLength): New function.
* src/ByteArrayDiskWriter.cc
(clear): Added buf = 0 to avoid double free corruption.
* src/FileAllocator.cc
(allocate): Fixed an assignment of
fileAllocationMonitor->currentValue.
Added cp.reset().
* src/BitfieldMan.h
(operator=): Rewritten.
* src/BitfieldMan.cc
(BitfieldMan): Initialized bitfield, useBitfield.
* src/PeerConnection.cc
(receiveMessage): Added a call to socket->readable() after
getting
message length to avoid possible EOF.
* src/Util.cc
(torrentUrlencode): Fixed an encodeing bug. BUG#1629912
2007-01-11 16:32:31 +00:00
Tatsuhiro Tsujikawa
3a412f89b2
2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
To add an ability to pre-allocate file space:
* src/DirectDiskAdaptor.h: Rewritten.
* src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
* src/MultiDiskAdaptor.h: Rewritten.
* src/DefaultPieceStorage.cc
(MultiDiskWriter.h): Removed include.
(PreAllocationDiskWriter.h): Removed include.
(FileAllocationMonitor.h): New include.
(~DefaultPieceStorage): Removed deletion of diskAdaptor.
(initStorage): Rewritten.
(getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
* src/FileAllocator.h: New class.
* src/FileAllocator.cc: New class.
* src/FileAllocationMonitor.h: New class.
* src/FileAllocationMonitor.cc: New class.
* src/ConsoleFileAllocationMonitor.h: New class.
* src/ConsoleFileAllocationMonitor.cc: New class.
* src/AbstractSingleDiskAdaptor.h: New class.
* src/AbstractSingleDiskAdaptor.cc: New class.
* src/DiskAdaptor.h
(Directory.h): Removed include.
(DiskWriter.h): Removed include.
(FileEntry.h): Removed include.
(diskWriter): Removed.
(DiskAdaptor): Removed diskWriter.
(openFile): Made pure virtual.
(closeFile): Made pure virtual.
(openExistingFile): Made pure virtual.
(initAndOpenFile): Made pure virtual.
(writeData): Made pure virtual.
(readData): Made pure virtual.
(sha1Sum): Made pure virtual.
(getStoreDir): Returns const reference of storeDir.
(DiskAdaptorHandle): New type definition.
* src/main.cc
(ConsoleFileAllocationMonitor.h): New include.
(showUsage): Added default value description of -s option.
Added the description of --file-allocation option.
(main): Set default value of --file-allocation option to 'none'.
Added --file-allocation command-line option.
Setup FileAllocationMonitorFactory.
* src/FtpInitiateConnectionCommand.cc
(executeInternal): Removed diskWriter related processing, which
was
moved to FtpNegotiationCommand.cc.
* src/DirectDiskAdaptor.cc
(getFilePath): Made non-const.
* src/CopyDiskAdaptor.h
(DiskAdaptor.h): Removed include.
(DiskWriter.h): Removed include.
(AbstractSingleDiskAdaptor.h): New include.
(getFilePath): Made non-const. Added virtual keyword.
(CopyDiskAdaptor): Removed diskWriter.
(getTempFile): Returns const reference.
(CopyDiskAdaptorHandle): New type definition.
* src/ByteArrayDiskWriter.cc
(clear): Simplified.
(initAndOpenFile): Rewritten.
(openFile): Call initAndOpenFile()
* src/MultiDiskAdaptor.cc: Rewritten.
* src/DownloadEngineFactory.cc
(FileAllocator.h): New include.
(FileAllocationMonitor.h): New include.
(newConsoleEngine): Call
DefaultDiskWriter::createNewDiskWriter() to
create DefaultDiskWriter with file allocator.
* src/DiskWriter.h
(initAndOpenFile): Added totalLength argument.
(openFile): Added totalLength argument.
* src/prefs.h
(PREF_FILE_ALLOCATION): New definition.
(V_PREALLOC): New definition.
(V_NONE): New definition.
* src/HttpResponseCommand.cc
(handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile
with
size.
* src/FtpNegotiateCommand.cc
(Util.h): New include.
(recvSize): Open file here.
* src/Util.h
(ullitos): New function.
* src/CopyDiskWriter.h
(getFilePath): Made non-const.
* src/DefaultDiskWriter.h
(Option.h): New include.
(totalLength): Removed.
(DefaultDiskWriter): Removed totalLength.
(initAndOpenFile): Added totalLength argument.
(DefaultDiskWriterHandle): New type definition.
(createNewDiskWriter): New function.
* src/Util.cc
(ullitos): New function.
* src/DefaultDiskWriter.cc
(message.h): New include.
(FileAllocator.h): New include.
(prefs.h): New include.
(Util.h): New include.
(DefaultDiskWriter): Removed totalLength.
(initAndOpenFile): Added file allocation.
(createNewDiskWriter): New function. Just for temporary
solution.
It will be rewritten later.
* src/DiskAdaptor.cc
(DiskAdaptor): Removed diskWriter.
* src/AbstractDiskWriter.cc
(LogFactory.h): New include.
(AbstractDiskWriter): Added fileAllocator, logger.
(openFile): Added totalLength argument.
* src/AbstractDiskWriter.h
(FileAllocator.h): New include.
(Logger.h): New include.
(fileAllocator): New variable.
(logger): New variable.
(openFile): Added totalLength argument. Added virtual keyword
explicitly.
(openExistingFile): Added totalLength argument. Added virtual
keyword
explicitly.
(closeFile): Added virtual keyword explicitly.
(sha1Sum): Added virtual keyword explicitly.
(writeData): Added virtual keyword explicitly.
(readData): Added virtual keyword explicitly.
(setFileAllocator): New function.
* src/DefaultPieceStorage.h
(FileAllocator.h): New include.
(diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
(getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
* src/FileProgressMonitor.h: New class.
To compile aria2 on PC-BSD:
* src/DefaultBtContext.cc
(libgen.h): New include.
To fix memory leak:
* src/Exception.h
(~Exception): Delete cause. Fixed memory leak.
2007-01-08 00:13:25 +00:00
Tatsuhiro Tsujikawa
458cc27462
2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
To know root cause of exception:
* src/Exception.h
(cause): New variable.
(Exception): Added a parameter.
(getMsg): Return const reference to msg.
(getCause): New function.
* src/DlRetryEx.h
(DlRetryEx): Added a parameter 'cause'.
Added an overloaded constructor.
(DlAbortEx): Added a parameter 'cause'.
Added an overloaded constructor.
* src/SimpleLogger.cc
(writeLog): Log nested exception messages recursively.
2006-12-01 09:31:46 +00:00
Tatsuhiro Tsujikawa
1b5af8e829
2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
* src/*.{h,cc}:
Added an exception to the license which allows linking with
OpenSSL.
2006-09-21 15:31:24 +00:00
Tatsuhiro Tsujikawa
b1d46227d4
make string type argument const string& where possible
2006-04-19 17:49:03 +00:00
Tatsuhiro Tsujikawa
20ba8c707a
* Util.{h,cc}: added startsWith().
...
* CookieBox.cc: rewrited criteriaFind() using Util::startsWith()
and
Util::endsWith().
* SocketCore.cc: struct addrinfo is now zero-initialized.
* common.h: added #include directive of limit.h.
* DownloadEngine.cc: added #include directive of sys/time.h and
algorithm.
* Exception.h: added #include directive of stdio.h.
* AbstractCommand.h: added #include directive of sys/time.h.
* DownloadCommand.h: added #include directive of sys/time.h.
* *.h: added #include directive of common.h to all base classes.
subclasses' one was removed.
2006-02-28 02:25:45 +00:00
Tatsuhiro Tsujikawa
5752a554bf
* Added Referer support.
...
* Added referer command-line option.
* Added rety-wait command-line option.
* Fixed formating bug in Exception::setMsg()
2006-02-18 05:13:21 +00:00
Tatsuhiro Tsujikawa
52634627bc
Initial import
2006-02-17 13:35:04 +00:00