Commit Graph

551 Commits (5cc4ca588742de393cdc1b9e3b66d620043a2cb4)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 5cc4ca5887 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added Simplified Chinese translation. Also updated the following
	translations: Polish, Dutch, German. Great thanks to all 
translators.
2008-03-15 11:05:03 +00:00
Tatsuhiro Tsujikawa 42fa16b780 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Suppress content-range error when 'Content-Range' response header
	doesn't contains bytes-unit specifier 'bytes'
	* src/HttpHeader.cc (getRange)
	* test/HttpHeaderTest.cc
2008-03-15 04:25:55 +00:00
Tatsuhiro Tsujikawa 538a8fcfe7 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation error with g++-4.3
2008-03-15 04:19:46 +00:00
Tatsuhiro Tsujikawa 8dacfe45b8 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added missing include files for MinGW
	* test/HttpHeaderProcessorTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/UriListParserTest.cc
2008-03-13 13:13:53 +00:00
Tatsuhiro Tsujikawa 34df2cc416 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now download line is printed nicely with no garbage at the end 
of
	line. I use ioctl to get the columns of terminal.
	If stdout is redirected to another device, instead of carriage 
return,
	end of line '\n' character is used. This is feature 
request#1909659
	* src/ConsoleStatCalc.cc (calculateStat)
2008-03-11 16:18:33 +00:00
Tatsuhiro Tsujikawa 102ce611d1 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Included a2time.h
	* src/DHTMessageDispatcher.h
	* src/DHTMessageEntry.h
	* src/DHTReplaceNodeTask.h
	* src/DHTMessageTracker.h
	* src/Util.h
	* src/CookieBox.h
	* src/SocketCore.h
	* src/DefaultBtMessageDispatcher.h
	* src/SocketCore.cc
	* src/Util.cc
	* src/DHTPingTask.h
2008-03-11 14:47:08 +00:00
Tatsuhiro Tsujikawa 852315bf11 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed high memory footprint when DHT is enabled.
	This is not a memory leak, but DHTReplaceNodeTask is more frequently
	queued than it is processed and the queue is getting longer. As a
	consequence, momory usage is increased.
	As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
	replacement cache in DHTBucket which is described in Kademlia paper.
	* src/DHTRoutingTable.cc (addNode): Removed the issuing of
	DHTReplaceNodeTask.
	* src/DHTBucket.{h, cc}
	(cacheNode): New function.
	(getCachedNodes): New function.
	(dropNode): Push back cached node to _nodes.
	* test/DHTBucketTest.cc
	(testCacheNode): New test
	(testDropNode): New test
2008-03-11 14:19:10 +00:00
Tatsuhiro Tsujikawa ddb00a9445 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Allocate memory for peekBuf in initiateSecureConnection() to 
avoid
	the unused 4KB memory when ssl is not used.
	* src/SocketCore.cc
2008-03-11 12:33:20 +00:00
Tatsuhiro Tsujikawa ce5c17f1b3 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added summary log for peer announce storage.
	* src/DHTPeerAnnounceStorage.cc (handleTimeout)
	
	Removed cast
	* src/DefaultPeerStorage.cc (addPeer)

	Log exception message
	* src/DHTMessageTracker.cc (handleTimeout)

	Fixed casting
	* test/HttpRequestTest.cc
	* test/MetalinkProcessorTest.cc
	* test/PieceTest.cc
	* test/MetalinkEntryTest.cc
	* test/SequenceTest.cc
2008-03-11 12:31:14 +00:00
Tatsuhiro Tsujikawa 3349c7625c 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/ParameterizedStringParser.cc (createLoop):
	Removed unused variable sstep.

	* src/AlphaNumberDecorator.h (decode): Rewritten.
2008-03-09 15:19:35 +00:00
Tatsuhiro Tsujikawa 68b84574ae 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/Util.{h, cc}
	(parseUInt): New function.
	(alphaToNum): Now returns unsigned int and 0 when overflow 
detected.
	The actual range is uint32_t.
	* test/UtilTest.cc
	
	* src/ParameterizedStringParser.cc:
	Use Util::parseUInt() for loop variables.
	* test/ParameterizedStringParserTest.cc
	
	* src/PStringNumLoop.h: Make _startValue and _endValue unsigned 
int.
2008-03-09 15:03:47 +00:00
Tatsuhiro Tsujikawa 7f40794931 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten the functions for binding port.
	* src/DHTConnectionImpl.{h, cc}
	* src/PeerListenCommand.{h, cc}
	* src/DHTSetup.cc
	* src/BtSetup.cc
	* test/DHTConnectionImplTest.cc
2008-03-09 14:09:17 +00:00
Tatsuhiro Tsujikawa 032c7c2808 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
type cleanup for allmost all remaining files.
2008-03-09 12:24:01 +00:00
Tatsuhiro Tsujikawa ca3f6e57f3 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Type clarification
	* src/PeerSessionResource.{h, cc}
	* src/DefaultPieceStorage.{h, cc}
	* src/Peer.{h, cc}
	* test/PeerSessionResourceTest.cc

	Use div function
	* src/BtPieceMessage.cc (erasePieceOnDisk)
2008-03-08 11:10:37 +00:00
Tatsuhiro Tsujikawa 2555098ecd 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Type clarification
	* src/DefaultPeerStorage.{h, cc}
	* test/DefaultPeerStorageTest.cc
2008-03-08 10:44:25 +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 518a200d57 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/PiecedSegment.cc
	* src/GrowSegment.h
	* src/DefaultBtRequestFactory.h
	* src/DefaultBtProgressInfoFile.cc
	* src/UnknownLengthPieceStorage.h
	* src/DefaultPieceStorage.cc
	* src/UnknownLengthPieceStorage.cc
	* src/DefaultBtInteractive.cc
	* src/GrowSegment.cc
	* src/BitfieldMan.h
	* src/DownloadCommand.cc
	* src/BtRequestFactory.h
	* src/PiecedSegment.h
	* src/DefaultPieceStorage.h
	* src/Piece.cc
	* src/DefaultBtRequestFactory.cc
	* src/PieceStorage.h
	* src/Segment.h
	* src/Piece.h
	* src/BitfieldMan.cc
	* src/Util.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/MockPieceStorage.h
	* test/BtRequestMessageTest.cc
	* test/DefaultBtMessageDispatcherTest.cc
	* test/BitfieldManTest.cc
	* test/GrowSegmentTest.cc
	* test/PieceTest.cc
	* test/SegmentTest.cc
	* test/SegmentManTest.cc
	* test/DefaultBtRequestFactoryTest.cc
	* test/MockBtRequestFactory.h
2008-03-08 08:04:28 +00:00
Tatsuhiro Tsujikawa aa669e8646 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation error with --disable-nls
	It seems that defining gettext(Msgid) to ((const char *) 
(Msgid))
	in gettext.h causes the problem.
	* src/common.h
2008-03-08 07:53:16 +00:00
Tatsuhiro Tsujikawa e57a070a3f 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed subPiece related functions.
	* src/Piece.{h, cc} : Also rewritten getCompletedLength().
	* src/DefaultPieceStorage.{h, cc}
	* test/PieceTest.cc
	* test/DefaultPieceStorageTest.cc
2008-03-07 12:44:20 +00:00
Tatsuhiro Tsujikawa fc0fa4203a 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use unsigned char for data store.
2008-03-07 12:05:50 +00:00
Tatsuhiro Tsujikawa 7578d5fb22 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.0+1
	* configure.ac
	
	* Release 0.13.0+1
2008-03-07 11:48:19 +00:00
Tatsuhiro Tsujikawa 74b82c44e8 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed inactive connection timeout to 120.
	To accept more mulually interested peers, disconnect peer when 
there
	is no interest between us after certain time passed.
	* src/DefaultBtInteractive.cc (checkActiveInteraction)
2008-03-05 15:31:09 +00:00
Tatsuhiro Tsujikawa 37a5b99f33 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that aria2 only uses first dns server in 
resolv.conf
	when compiled with async DNS support.
	* src/DownloadEngine.cc
	* src/option_processing.cc: Lengthened DNS timeout to 30. I 
think old
	value '10' will be a little bit short when some DNS servers are
	offline and several DNS servers are tried. It should be 
configured
	by command-line option.
2008-03-05 10:35:39 +00:00
Tatsuhiro Tsujikawa 62e1cbd0c0 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Merged Ross's mingw patch.
	* src/DHTRoutingTableDeserializer.cc
	* src/DHTRoutingTableSerializer.cc
	* src/Platform.{h, cc}
	* src/timegm.h
	* src/gettimeofday.h
	* src/getaddrinfo.h
	* src/SocketCore.h
	* src/common.h
	* src/inet_aton.h
	* src/DownloadEngine.h
	* src/gai_strerror.h
	* src/a2netcompat.h
	* configure.ac
	* configure
	* aclocal.m4
2008-03-03 15:41:58 +00:00
Tatsuhiro Tsujikawa 55552adb93 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Included missing iostream.
	* test/AllTest.cc
	* test/BtDependencyTest.cc
	* test/BtExtendedMessageTest.cc
	* test/DHTConnectionImplTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTMessageTrackerEntryTest.cc
	* test/DHTNodeTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtContextTest.cc
	* test/DefaultBtMessageFactoryTest.cc
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/HttpResponseTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/SocketCoreTest.cc
	* test/UTPexExtensionMessageTest.cc
2008-03-03 11:30:12 +00:00
Tatsuhiro Tsujikawa 6b07846b58 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Reorganized includes.
	* src/NameResolver.cc
2008-03-03 10:47:16 +00:00
Tatsuhiro Tsujikawa 4771fcf53c 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation error without ares/c-ares
	* src/NameResolver.h:
2008-03-01 09:31:54 +00:00
Tatsuhiro Tsujikawa 3f17f5ffd7 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added a test for large file.
	* test/MetalinkProcessorTest.cc (testLargeFileSize):
2008-03-01 06:07:10 +00:00
Tatsuhiro Tsujikawa 067ef72e5e 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that file size is ignored if size > INT32_MAX
	* src/SizeMetalinkParserState.cc (endElement):
2008-03-01 05:40:11 +00:00
Tatsuhiro Tsujikawa a31cd44130 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.0
	* configure.ac
	
	* Release 0.13.0
2008-03-01 04:44:13 +00:00
Tatsuhiro Tsujikawa b1aeb277aa 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated Makfefile.am to make 'make dist' work.
	Now packaged filename is aria2c-VERSION.tar.bz2.
	Added README, README.html, and aria2c.1.html to dist_doc_DATA.
	Added LICENSE.OpenSSL to dist_noinst_DATA.

	Large file support is now configured by configure script.
	* configure.ac
	
	Removed unsused source files
	* src/
	* test/

	Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
	Peer.h and BtContext.h respectively.
	* src/Peer.h
	* src/BtContext.h

	Updated translations.
	Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
	translations. Great thanks to all translators!;)
	* po/*.{po, gmo}
2008-03-01 04:42:53 +00:00
Tatsuhiro Tsujikawa 3698b46805 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Create MessageDigestHelper::staticSHA1DigestInit() which uses
	statically declared sha1 MessageDigestContext.
	* src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
	initialization of short-lived MessageDigestContext.
	* src/MessageDigestHelper.{h, cc}
	* src/main.cc
	
	Now DownloadCommand has a reference to MessageDigestContext to avoid
	the initialization of MessageDigestContext every time in validating
	chunk checksum.
	* src/DownloadCommand.{h, cc}
2008-02-28 17:40:47 +00:00
Tatsuhiro Tsujikawa a1458a1642 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Add a file descriptor which connected to fast peer(latency<1500) 
to
	select(). This change reduced CPU load.
	* src/PeerInteractionCommand.cc
	* src/DefaultBtInteractive.{h, cc}
	* src/BtInteractive.h
2008-02-28 14:27:00 +00:00
Tatsuhiro Tsujikawa c766d945ef 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the previous insufficient fix for possible busy loop.
	* src/MSEHandshake.cc (identifyHandshakeType)

	Removed unused functions.
	* src/MSEHandshake.{h, cc} (readDataAndDecrypt)
2008-02-28 14:18:12 +00:00
Tatsuhiro Tsujikawa 50bb9bd36d 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed possible busy loop if first 20 bytes are not received for 
a few
	minutes.
	* src/MSEHandshake.{h, cc} (identifyHandshakeType)
	* src/ReceiverMSEHandshakeCommand.cc
2008-02-27 16:43:52 +00:00
Tatsuhiro Tsujikawa c1fd47809d 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation error
	* src/ExpatMetalinkProcessor.cc
2008-02-27 15:04:42 +00:00
Tatsuhiro Tsujikawa f9afa5eeac 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error on Mac OS X, on 64Bit OS maybe.
	* src/DHTBucket.cc

	Removed unnecessary cast.
	* src/HandshakeExtensionMessage.cc
2008-02-27 13:16:04 +00:00
Tatsuhiro Tsujikawa eb9f9ac59d 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that option handler for 
PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
	is missing.
	* src/OptionHandlerFactory.cc
2008-02-27 12:56:52 +00:00
Tatsuhiro Tsujikawa 897ab7321f 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that HAVE message is not sent for a piece they are
	downloaded fom http/ftp server before any BitTorrent handshake 
is done
	with peers.
	* src/DefaultBtInteractive.cc
2008-02-27 12:55:30 +00:00
Tatsuhiro Tsujikawa deff272435 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed RequestInfo.h and FileAllocator.h since they have been 
removed.
	* src/Makefile.am
	* src/Makefile.in
2008-02-27 10:59:32 +00:00
Tatsuhiro Tsujikawa 8958b4c4d4 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated README. Added html version of README and man page.
	* README
	* README.html
	* readme2html: Shell script to generate README.html from README 
using
	asciidoc.
	* doc/aria2c.1.html
	* doc/makeman: Added the line to generate aria2c.1.html
2008-02-26 12:38:45 +00:00
Tatsuhiro Tsujikawa 1d32c516d9 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed offset calculation.
	* src/LibgcryptDHKeyExchange.h (computeSecret)
2008-02-24 13:56:03 +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 27ab4b1579 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that DH key exchange sometimes fails due to bad 
handling
	of the number of bytes required for storing public key and 
shared
	secret.
	* src/LibgcryptDHKeyExchange.h
	* src/LibsslDHKeyExchange.h: Also added function name to 
handleError.
	* src/MSEHandshake.cc
	* test/DHKeyExchangeTest.cc
2008-02-24 07:52:12 +00:00
Tatsuhiro Tsujikawa ac5332c5eb 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed since they are not used.
	* src/Xml2MetalinkProcessor.{h, cc}
	* src/Socket.cc
	* src/SegmentSplitter.{h, cc}
	* test/Xml2MetalinkProcessorTest.cc
2008-02-24 07:41:16 +00:00
Tatsuhiro Tsujikawa a1f0d44c9f 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that prevents aria2 from stopping other than by 
pressing
	Ctrl-C in BitTorrent download. It is reproducible using 
--seed-time
	option. aria2 doesn't stop even after --seed-time is satisfied 
and
	continues to output blank lines in the console.
	* src/ReceiverMSEHandshakeCommand.cc
	* src/PeerReceiveHandshakeCommand.cc
	* src/PeerListenCommand.cc
2008-02-23 15:37:47 +00:00
Tatsuhiro Tsujikawa 88cd57f7a2 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.0rc
	* configure.ac
2008-02-21 14:41:23 +00:00
Tatsuhiro Tsujikawa 6148b08d34 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated man page and some usage text.
	* doc/aria2c.1.txt
	* src/usage_text.h
	* po/*.{po, gmo}
2008-02-21 14:23:36 +00:00
Tatsuhiro Tsujikawa 465b3bb961 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated translations. Added Finnish and Hebrew translations.
	Great thanks to all translators!
	* po/*.{po, gmo}
	* po/LINGUAS
2008-02-21 12:46:20 +00:00
Tatsuhiro Tsujikawa 7e6d037c97 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Log more detailed information about each message.
	* src/DHTQueryMessage.{h, cc}
	* src/DHTGetPeersMessage.{h, cc}
	* src/DHTFindNodeReplyMessage.{h, cc}
	* src/DHTGetPeersReplyMessage.{h, cc}
	* src/DHTAnnouncePeerMessage.{h, cc}
	* src/DHTResponseMessage.{h, cc}
	* src/DHTFindNodeMessage.{h, cc}
2008-02-21 12:25:26 +00:00