Tatsuhiro Tsujikawa
b1132d6b10
make clang-format using clang-format-3.6
2015-12-27 18:40:08 +09:00
Nils Maier
a3ba5c0588
Make clang (OSX) happy again
2015-06-24 14:26:43 +02:00
Tatsuhiro Tsujikawa
318c804504
Use user-defined literal for k, m, and g (powers of 1024)
2015-06-21 19:29:54 +09:00
Tatsuhiro Tsujikawa
9b84727324
Use std::make_shared and make_unique where possible, part 2
2014-09-13 18:37:57 +09:00
Tatsuhiro Tsujikawa
8750d7be99
Disard cache when checking checksum
...
This will slow down checksum checking but does not thrash cache.
2014-07-02 00:05:43 +09:00
Tatsuhiro Tsujikawa
07d270c87e
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
3258614033
Removed *Handle typedef
2012-09-28 23:27:46 +09:00
Tatsuhiro Tsujikawa
860f4dd06a
Use int64_t instead of off_t
...
Using off_t, at least, in DiskAdaptor layer is problematic because
torrent can contain under 2GiB files but total sum of those files may
exceed 2GiB limit, which makes off_t overflow in 32 bit system without
large file support. So we use int64_t in API. We'll check the file
length before download so that it does not exceed max off_t.
2012-07-23 21:42:47 +09:00
Tatsuhiro Tsujikawa
4b03634f36
Use PRId64 for int64_t format specifier
2012-06-25 22:43:33 +09:00
Tatsuhiro Tsujikawa
12988e5282
Replaced uint64_t with off_t or int64_t.
...
Since off_t is int64_t with LFS, we cannot take advantage of extra
capacity of uint64_t.
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
1687741303
Use fmt instead of util::itos
2011-11-13 20:55:06 +09:00
Tatsuhiro Tsujikawa
ba87268d1c
Simplified IteratableChunkChecksumValidator
2011-10-13 22:05:18 +09:00
Tatsuhiro Tsujikawa
310e58bc62
Stored hash value as raw byte string, instead of hex digest.
2011-10-13 21:40:07 +09:00
Tatsuhiro Tsujikawa
02307cee0a
Removed utf8ToNative from log message and exception message.
2011-08-08 21:46:10 +09:00
Tatsuhiro Tsujikawa
3879da592d
In MinGW32, open file with UNICODE filename and print them in ANSI.
2011-08-04 21:43:02 +09:00
Tatsuhiro Tsujikawa
03f0774482
Consistent naming scheme for hash type and digest for DownloadContext.
2011-07-27 22:44:30 +09:00
Tatsuhiro Tsujikawa
5bbfa742fc
Removed use of O_DIRECT because it performs bad.
2011-07-16 13:57:31 +09:00
Tatsuhiro Tsujikawa
2666bc8170
Renamed MessageDigestHelper as message_digest_helper
...
Static member variables in MessageDigestHelper class are now functions
under message_digest namespace.
2011-02-05 23:38:51 +09:00
Tatsuhiro Tsujikawa
694fb307aa
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced StringFormat with fmt
2010-11-20 09:36:14 +00:00
Tatsuhiro Tsujikawa
580098eb49
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Rewritten Logger interface. Logger now writes source file name and
line number in log file.
2010-11-20 08:21:36 +00:00
Tatsuhiro Tsujikawa
89f997ec0d
2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced MessageDigestContext with MessageDigest. Cleaned up
unnecessary functions in MessageDigestHelper.
* src/BtPieceMessage.cc
* src/Checksum.h
* src/DHTTokenTracker.cc
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/HashFuncEntry.h
* src/IteratableChecksumValidator.cc
* src/IteratableChecksumValidator.h
* src/IteratableChunkChecksumValidator.cc
* src/IteratableChunkChecksumValidator.h
* src/LibgcryptMessageDigestImpl.cc
* src/LibgcryptMessageDigestImpl.h
* src/LibsslMessageDigestImpl.cc
* src/LibsslMessageDigestImpl.h
* src/MSEHandshake.cc
* src/MSEHandshake.h
* src/Makefile.am
* src/MessageDigest.cc
* src/MessageDigest.h
* src/MessageDigestHelper.cc
* src/MessageDigestHelper.h
* src/MessageDigestImpl.h
* src/MetalinkParserController.cc
* src/Piece.cc
* src/Piece.h
* src/UTMetadataDataExtensionMessage.cc
* src/bittorrent_helper.cc
* src/messageDigest.cc: Removed
* src/messageDigest.h: Removed
* src/util.cc
* src/version_usage.cc
* test/BittorrentHelperTest.cc
* test/GZipDecoderTest.cc
* test/GZipDecodingStreamFilterTest.cc
* test/IteratableChecksumValidatorTest.cc
* test/IteratableChunkChecksumValidatorTest.cc
* test/Makefile.am
* test/MessageDigestHelperTest.cc
* test/MessageDigestTest.cc
* test/Metalink2RequestGroupTest.cc
* test/MetalinkProcessorTest.cc
* test/PieceTest.cc
* test/TestUtil.cc
* test/TestUtil.h
* test/UTMetadataDataExtensionMessageTest.cc
* test/UTMetadataPostDownloadHandlerTest.cc
2010-11-11 02:56:24 +00:00
Tatsuhiro Tsujikawa
228b4c50d7
2010-11-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Capture errno right after system/library call to avoid it to get
overwritten. Use util::safeStrerror instead of strerror directly
because strerror might return NULL. We don't check errno for
std::fstream anymore.
* src/AbstractDiskWriter.cc
* src/CookieStorage.cc
* src/DHTAutoSaveCommand.cc
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* src/DefaultBtProgressInfoFile.cc
* src/EpollEventPoll.cc
* src/IteratableChunkChecksumValidator.cc
* src/KqueueEventPoll.cc
* src/Logger.cc
* src/MessageDigestHelper.cc
* src/PortEventPoll.cc
* src/SelectEventPoll.cc
* src/SocketCore.cc
* src/message.h
* src/util.cc
* src/util.h
2010-11-09 14:43:47 +00:00
Tatsuhiro Tsujikawa
b7df39b7ae
2010-10-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed compiler warning about printf format.
* src/AdaptiveURISelector.cc
* src/BtPieceMessage.cc
* src/DHTAbstractNodeLookupTask.h
* src/DHTMessageFactoryImpl.cc
* src/DHTPeerLookupTask.cc
* src/DHTReplaceNodeTask.cc
* src/DefaultBtAnnounce.cc
* src/DefaultBtInteractive.cc
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtProgressInfoFile.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultExtensionMessageFactory.cc
* src/DefaultPieceStorage.cc
* src/DownloadCommand.cc
* src/FileAllocationCommand.cc
* src/FileEntry.cc
* src/HandshakeExtensionMessage.cc
* src/IteratableChunkChecksumValidator.cc
* src/LibgcryptDHKeyExchange.h
* src/LibsslDHKeyExchange.h
* src/LpdDispatchMessageCommand.cc
* src/MSEHandshake.cc
* src/MessageDigestHelper.cc
* src/MultiDiskAdaptor.cc
* src/PeerConnection.cc
* src/SegmentMan.cc
* src/TimedHaltCommand.cc
* src/UTMetadataRequestExtensionMessage.cc
* src/UTPexExtensionMessage.cc
* src/bencode2.cc
* src/bittorrent_helper.cc
* src/message.h
2010-10-28 14:19:29 +00:00
Tatsuhiro Tsujikawa
ca4940622c
2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Changed naming standards for class member variable: now it looks
like var_ instead of _var.
2010-06-21 13:51:56 +00:00
Tatsuhiro Tsujikawa
9be631e007
2010-06-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added _logger->info() guard
* src/IteratableChunkChecksumValidator.cc
2010-06-01 11:45:53 +00:00
Tatsuhiro Tsujikawa
e227e53d7b
2010-02-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Wrapped logger->debug(...) with if(logger->debug()) { ... }
* src/AbstractCommand.cc
* src/AdaptiveURISelector.cc
* src/BtPieceMessage.cc
* src/BtPortMessage.cc
* src/CreateRequestCommand.cc
* src/DHTAbstractNodeLookupTask.cc
* src/DHTBucket.cc
* src/DHTGetPeersCommand.cc
* src/DHTMessageDispatcherImpl.cc
* src/DHTMessageFactoryImpl.cc
* src/DHTMessageTracker.cc
* src/DHTPeerAnnounceStorage.cc
* src/DHTRoutingTable.cc
* src/DHTSetup.cc
* src/DefaultBtAnnounce.cc
* src/DefaultBtInteractive.cc
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtMessageReceiver.cc
* src/DefaultBtProgressInfoFile.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultPeerStorage.cc
* src/DefaultPieceStorage.cc
* src/DownloadCommand.cc
* src/DownloadEngine.cc
* src/EpollEventPoll.cc
* src/FileAllocationCommand.cc
* src/FileEntry.cc
* src/FtpNegotiationCommand.cc
* src/HandshakeExtensionMessage.cc
* src/HttpListenCommand.cc
* src/HttpServer.cc
* src/HttpSkipResponseCommand.cc
* src/IteratableChunkChecksumValidator.cc
* src/Logger.h
* src/MSEHandshake.cc
* src/MetalinkPostDownloadHandler.cc
* src/MultiDiskAdaptor.cc
* src/PeerAbstractCommand.cc
* src/PeerConnection.cc
* src/PeerListenCommand.cc
* src/PeerReceiveHandshakeCommand.cc
* src/RequestGroup.cc
* src/RequestGroupMan.cc
* src/SegmentMan.cc
* src/SelectEventPoll.cc
* src/ServerStat.cc
* src/SimpleBtMessage.cc
* src/SocketCore.cc
* src/TrackerWatcherCommand.cc
* src/UTMetadataDataExtensionMessage.cc
* src/UTMetadataRequestFactory.cc
* src/UTMetadataRequestTracker.cc
* src/XmlRpcMethod.cc
2010-02-09 12:20:20 +00:00
Tatsuhiro Tsujikawa
4db349c1f3
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Untabify. Fixed one line in copyright which is longer than 80
columns.
* src
* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa
309d292831
2009-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Use C++ style cast
* src/AsyncNameResolver.cc
* src/Base64.h
* src/BtBitfieldMessage.cc
* src/BtHandshakeMessage.cc
* src/DefaultBtMessageFactory.cc
* src/DefaultBtProgressInfoFile.cc
* src/EpollEventPoll.cc
* src/ExpatMetalinkProcessor.cc
* src/IteratableChecksumValidator.cc
* src/IteratableChunkChecksumValidator.cc
* src/MessageDigestHelper.cc
* src/Platform.cc
* src/RequestGroupMan.cc
* src/SingleFileAllocationIterator.cc
* src/Sqlite3MozCookieParser.cc
* src/XML2SAXMetalinkProcessor.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/util.cc
* src/util.h
2009-11-15 12:55:50 +00:00
Tatsuhiro Tsujikawa
e976b23728
2009-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Renamed Util.{cc,h} as util.{cc,h}
* src/Util.cc
* src/Util.h
* src/util.cc
* src/util.h
2009-10-22 15:35:33 +00:00
Tatsuhiro Tsujikawa
c6035b2e24
2009-10-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Moved static functions in Util class to namespace util.
* src
* test
2009-10-22 15:09:00 +00:00
Tatsuhiro Tsujikawa
5699b67526
2009-06-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
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-06-28 10:37:15 +00:00
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
ee229c6f00
2009-05-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed the bug that with --check-integrity option aria2 reports
downloaded file size is 0 even if some parts of file is
correctly downloaded. This bug is reproducible for the download
that a file includes last piece is missing. This bug doesn't
reveal for single-torrent with file allocation on.
* src/IteratableChecksumValidator.cc
* test/IteratableChecksumValidatorTest.cc
2009-05-03 06:26:44 +00:00
Tatsuhiro Tsujikawa
07419749f2
2008-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Included cstdlib. This fixed the compile error with g++-4.3.2.
* src/IteratableChecksumValidator.cc
* src/IteratableChunkChecksumValidator.cc
2008-10-20 12:20:40 +00:00
Tatsuhiro Tsujikawa
6ef72a14a2
2008-10-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Fixed compile warning on linux-amd64
* src/FtpConnection.cc
* src/IteratableChunkChecksumValidator.cc
* src/MultiDiskAdaptor.cc
Fixed the bug that unit test fails on linux-amd64
* test/UtilTest.cc
2008-10-12 16:09:12 +00:00
Tatsuhiro Tsujikawa
ef5c01ad33
2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Fixed unmatched malloc/free.
* src/IteratableChunkChecksumValidator.cc
* src/IteratableChecksumValidator.cc
2008-08-07 14:11:16 +00:00
Tatsuhiro Tsujikawa
bbd2a995db
2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Fixed compile error with OpenSSL.
* src/IteratableChunkChecksumValidator.cc
* src/LibsslDHKeyExchange.h
* src/MessageDigestHelper.cc
2008-05-19 15:08:18 +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
3505201f33
2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Rewritten SharedHandle. Now copy constructor taking raw pointer
has
keyword explicit and SharedHandle's default constructor
initializes
its internal obj to null, old implementation initializes it
using
obj's default constructor.
To assign null, write SharedHandle<T> x(...); x.reset();
TODO: test/SharedHandleTest.cc needs more tests.
* src/SharedHandle.h
2008-04-20 00:50:22 +00:00
Tatsuhiro Tsujikawa
c64a191061
2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Type clarification: size_t for length or size, uint64_t for file
length, off_t for file offset.
* src/DefaultBtProgressInfoFile.cc
* src/DefaultBtContext.{h, cc}
* src/DefaultBtInteractive.cc
* src/DownloadCommand.{h, cc}
* src/IteratableChunkChecksumValidator.{h, cc}
* src/SegmentMan.{h, cc}
* src/SingleFileDownloadContext.{h, cc}
* src/IteratableChecksumValidator.{h, cc}
* src/BtContext.h
* src/IteratableValidator.h
* src/DownloadContext.h
* test/SingleFileDownloadContextTest.cc
* test/DefaultBtContextTest.cc
* test/MockBtContext.h
* test/Metalink2RequestGroupTest.cc
2008-03-08 10:33:56 +00:00
Tatsuhiro Tsujikawa
5a4d691aed
2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Rewritten itos and uitos using template. llitos and ullitos are
replaced with itos and uitos respectively.
* src/Util.{h, cc}
* test/UtilTest.cc
2008-02-24 09:43:31 +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
2850c16f8a
2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Rewritten direct I/O support routine
* src/SingleFileAllocationIterator.cc
* src/MultiDiskAdaptor.{h, cc}
* src/ByteArrayDiskWriter.h
* src/AbstractSingleDiskAdaptor.h
* src/AbstractDiskWriter.cc
* src/DefaultPieceStorage.cc
* src/DiskWriter.h
* src/BinaryStream.h
* src/IteratableChunkChecksumValidator.cc
* src/IteratableChecksumValidator.cc
* src/CheckIntegrityEntry.cc
* src/FileAllocationEntry.cc
2007-12-05 17:11:22 +00:00
Tatsuhiro Tsujikawa
b75dbc4bbe
2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Enable direct I/O support in checksum checking.
* src/IteratableChunkChecksumValidator.{h, cc}
* test/IteratableChunkChecksumValidatorTest.cc
* src/CheckIntegrityEntry.cc
* src/PieceHashCheckIntegrityEntry.cc
* src/IteratableChecksumValidator.{h, cc}
* src/BtCheckIntegrityEntry.cc: Added doc.
2007-12-05 13:41:56 +00:00
Tatsuhiro Tsujikawa
7c41d11be3
2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
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-12 11:28:16 +00:00
Tatsuhiro Tsujikawa
b5ad009809
2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
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-09 18:01:12 +00:00
Tatsuhiro Tsujikawa
048a2cf597
2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
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-10-11 16:58:24 +00:00
Tatsuhiro Tsujikawa
e85f9ccfd6
2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
MessageDigestHelper is introduced in order to simplify the use
of message digest. Removed repeated code.
The message digest algorithm is now specified by string, like
"sha1",
"md5".
* src/messageDigest.{h, cc}
* src/MessageDigestHelper.{h, cc}: New class.
* src/DefaultPieceStorage.cc
* src/DefaultBtContext.{h, cc}
(computeFastSet): New function.
(setInfoHash): Added for unit testing.
(setNumPieces): Added for unit testing.
* src/DefaultBtInteractive.cc
* src/BtPieceMessage.cc
* src/Peer.cc
* src/Checksum.h
* src/message.h
* src/IteratableChecksumValidator.h
* src/ChunkChecksumValidator.{h, cc}: Use
IteratableChecksumValidator
inside it.
* src/SegmentMan.{h, cc}
(checkIntegrity): Removed.
* src/IteratableChunkChecksumValidator.{h, cc}
* src/Util.h
(sha1Sum): Removed.
(simpleMessageDigest): Removed.
(fileChecksum): Removed.
(computeFastSet): Removed.
* src/ShaVisitor.cc
* src/ChunkChecksum.h
* src/DownloadCommand.cc
Removed messageDigest virtual functions.
* src/MultiDiskAdaptor.{h, cc}
* src/DiskAdaptor.h
* src/ByteArrayDiskWriter.h
* src/DiskWriter.h
* src/DiskAdaptorWriter.h
* src/AbstractSingleDiskAdaptor.{h, cc}
* src/AbstractDiskWriter.{h, cc}
Fixed comilation error when message digest is disabled.
* src/MetalinkEntry.{h, cc}
* src/MetalinkRequestInfo.cc
Removed srandom and random.
* src/SimpleRandomizer.h
Added size() virtual function to DiskAdaptor
* src/MultiDiskAdaptor.h
Fixed the bug that causes that files are not opened correctly in
multi-file torrent.
* src/TorrentRequestInfo.cc
* src/MultiDiskAdaptor.cc
Added SHA256 support
* src/messageDigest.cc
* src/Xml2MetalinkProcessor.cc
Show supported message digest algorithms
* src/main.cc
Updated contact info.
* src/main.cc
2007-08-08 14:40:11 +00:00
Tatsuhiro Tsujikawa
380e3f0187
2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Merged Ross's win32 patch(manually)
In the course of merging, following files are added.
* src/strptime.{h,c}
* src/libgen.{h,c}
* src/inet_aton.{h,c}
* src/Platform.{h,cc}
* src/localtime_r.{h,c}
* src/getaddrinfo.{h,c}
I've gethered network related things, and put them to following
file:
* src/a2netcompat.h
Also io related things are put to following file:
* src/a2io.h
Changed %lld to %s because mingw32 doesn't recognize %lld.
* src/message.h
(MSG_ALLOCATION_COMPLETED)
(EX_TOO_LARGE_FILE)
(EX_SIZE_MISMATCH)
(EX_FILE_OFFSET_OUT_OF_RANGE)
(EX_INVALID_CHUNK_CHECKSUM)
(EX_INVALID_RANGE_HEADER)
* src/FileAllocationCommand.cc
* src/HttpResponse.cc
* src/RequestGroup.cc
* src/MultiDiskAdaptor.cc
* src/OptionHandlerImpl.h
* src/HttpResponseCommand.cc
* src/FtpNegotiateCommand.cc
* src/IteratableChecksumValidator.cc
* src/SegmentMan.cc
* src/ChunkChecksumValidator.cc
Added Randomizer::getRandomNumber(long int)
* src/Randomizer.h (getRandomNumber)
* src/SimpleRandomizer.h (getRandomNumber)
* src/BitfieldMan.cc (getMissingIndexRandomly): Use this new
function.
* src/Util.cc (randomAlpha): Use this new function.
2007-07-23 13:04:48 +00:00
Tatsuhiro Tsujikawa
079d2844ec
New files
2007-05-20 13:57:56 +00:00