Commit Graph

613 Commits (8de7cff9f41aa4778619a426f1983e68bdcea1bb)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 5bed29e79a 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed the default value of -j option to 1.
	* src/HelpItemFactory.cc
	* src/option_processing.cc
	* src/usage_text.h
2008-05-09 14:52:25 +00:00
Tatsuhiro Tsujikawa f25436725e 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the ability to reuse connection in FTP and it is enabled 
by
	default. It can be disabled by --ftp-reuse-connection=false 
option.
	* src/Command.cc
	* src/DownloadCommand.cc
	* src/FtpDownloadCommand.cc
	* src/FtpDownloadCommand.h
	* src/FtpFinishDownloadCommand.cc
	* src/FtpFinishDownloadCommand.h
	* src/FtpInitiateConnectionCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/FtpNegotiationCommand.h
	* src/HelpItemFactory.cc
	* src/Makefile.am
	* src/Makefile.in
	* src/OptionHandlerFactory.cc
	* src/option_processing.cc
	* src/prefs.h
	* src/usage_text.h
2008-05-09 14:44:28 +00:00
Tatsuhiro Tsujikawa 0b5e827ead 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Call Command::transitStatus() before calling Command::execute(),
	so that the status change made in execute() is not cleared.
	* src/DownloadEngine.cc
2008-05-09 14:36:06 +00:00
Tatsuhiro Tsujikawa 95e0fbfd7b 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed forward declaration of SocketCore class.
	* src/HttpDownloadCommand.h
2008-05-09 14:34:27 +00:00
Tatsuhiro Tsujikawa c3c05e9ab1 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Set Request::setKeepAliveHint() and Request::setPipeliningHint()
	in InitiateConnectionCommandFactory. They should be set only 
when
	the protocol is HTTP or HTTPS.
	* src/InitiateConnectionCommandFactory.cc
	* src/RequestGroup.cc
2008-05-09 14:28:46 +00:00
Tatsuhiro Tsujikawa b1d51f2442 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed infinite loop in checksum checking.
	* src/IteratableChecksumValidator.cc
2008-05-09 14:25:32 +00:00
Tatsuhiro Tsujikawa 5ea933fed1 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Set _supportsPersistentConnection to true by default.
	* src/Request.cc
	* src/RequestGroup.cc
	* test/HttpRequestTest.cc
	* test/RequestTest.cc
2008-05-08 13:20:15 +00:00
Tatsuhiro Tsujikawa 2c54667beb 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added timeout to socket pool. The default timeout is 15 seconds,
	which is the same value Apache uses.
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
2008-05-08 13:18:25 +00:00
Tatsuhiro Tsujikawa d52bce74d3 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten name resolver. Now async DNS can be disabled by 
--async-dns
	option.
	The asynchronous DNS is not capable of IPv6 yet.
	By disabling asynchronous DNS, aria2 is IPv6 enabled 
application, at
	least for HTTP download.
	* src/AbstractCommand.cc
	* src/AbstractCommand.h
	* src/AsyncNameResolver.cc
	* src/AsyncNameResolver.h
	* src/DHTEntryPointNameResolveCommand.cc
	* src/DHTEntryPointNameResolveCommand.h
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/FtpInitiateConnectionCommand.cc
	* src/FtpInitiateConnectionCommand.h
	* src/HelpItemFactory.cc
	* src/HttpInitiateConnectionCommand.cc
	* src/HttpInitiateConnectionCommand.h
	* src/InitiateConnectionCommand.cc
	* src/InitiateConnectionCommand.h
	* src/Makefile.am
	* src/Makefile.in
	* src/NameResolver.cc
	* src/NameResolver.h
	* src/OptionHandlerFactory.cc
	* src/SocketCore.cc
	* src/SocketCore.h
	* src/Util.cc
	* src/Util.h
	* src/option_processing.cc
	* src/prefs.h
	* src/usage_text.h
2008-05-08 11:18:36 +00:00
Tatsuhiro Tsujikawa d8f911b581 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated man page: --quiet, --header were added.
	--metalink-servers and --enable-http-keep-alive option were 
updated.
	* doc/aria2c.1
	* doc/aria2c.1.html
	* doc/aria2c.1.txt
2008-05-06 15:43:26 +00:00
Tatsuhiro Tsujikawa 620de10443 Removed following wrong entry:
2008-05-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>

	Enabled --enable-http-keep-alive by default.
	* src/option_processing.cc
2008-05-06 15:28:14 +00:00
Tatsuhiro Tsujikawa ac1b573e59 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Enable HTTP keep-alive by default.
	* src/HelpItemFactory.cc
	* src/option_processing.cc
	* src/usage_text.h
2008-05-06 15:26:43 +00:00
Tatsuhiro Tsujikawa e88eedc8f5 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Disable http keep-alive if the remote server is not HTTP/1.1.
	* src/HttpConnection.cc
2008-05-06 15:22:46 +00:00
Tatsuhiro Tsujikawa 4f150057ca 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Receive content body of 302 response so that the connection can 
be
	reused later when http keep-alive is enabled.
	* src/HttpNullDownloadCommand.cc
	* src/HttpNullDownloadCommand.h
	* src/HttpResponseCommand.cc
	* src/HttpResponseCommand.h
2008-05-06 15:20:59 +00:00
Tatsuhiro Tsujikawa 53464fd0fc 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
const SharedHandle<Request> -> const SharedHandle<Request>&
	* src/FtpDowndloadCommand.cc
	* src/FtpDowndloadCommand.h
	* src/HttpDownloadCommand.cc
	* src/HttpDownloadCommand.h
2008-05-06 15:14:14 +00:00
Tatsuhiro Tsujikawa 874714609f 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that the control file(.aria2 file) is not renamed
	according to tryAutoFileRenaming().
	tryAutoFileRenaming() was rewritten so that if both renamed file 
and
	its control file exist, use them and continue download.
	The old implementation didn't take into account of control 
file's
	existence, so basically you couldn't continue download of 
renamed file.
	* src/BtProgressInfoFile.h
	* src/DefaultBtProgressInfoFile.cc
	* src/DefaultBtProgressInfoFile.h
	* src/NullProgressInfoFile.h
	* src/RequestGroup.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/MockBtProgressInfoFile.h
2008-05-05 10:10:15 +00:00
Tatsuhiro Tsujikawa 6952eef7b6 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Change the default value of --metalink-servers option from `5' 
to `1'.
	* src/HelpItemFactory.cc
	* src/option_processing.cc
	* src/usage_text.h
2008-05-05 08:32:40 +00:00
Tatsuhiro Tsujikawa f596de9eec 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Reimplemented transparent metalink using Accept request header.
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/Metalink2RequestGroup.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* test/HttpRequestTest.cc
2008-05-05 08:25:41 +00:00
Tatsuhiro Tsujikawa b892b54e4b 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2a
	* configure.ac
2008-04-27 10:50:24 +00:00
Tatsuhiro Tsujikawa 63d7b5039f 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated configure.ac using the result of autoscan.
	* configure.ac
2008-04-27 10:47:43 +00:00
Tatsuhiro Tsujikawa 0f64c20da8 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation error without gcrypt/openssl.
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
2008-04-27 06:01:34 +00:00
Tatsuhiro Tsujikawa b74e27ff92 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Reorganized version information so that it can be displayed in a
	standard terminal screen without scrolling.
	Removed http, ftp from Configuration section, because they are 
always
	enabled.
	* src/FeatureConfig.cc
	* src/FeatureConfig.h
	* src/main.cc
	* src/messageDigest.cc
	* src/messageDigest.h
	* src/version_usage.cc
	* test/FeatureConfigTest.cc
2008-04-27 05:55:02 +00:00
Tatsuhiro Tsujikawa 3938307391 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Masked user ID in log.
	* src/FtpConnection.cc (sendUser)
2008-04-27 04:12:00 +00:00
Tatsuhiro Tsujikawa 4663902500 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed query part from filename in HTTP download. The query part means
	the substring after "?" in URL. Firefox seems do the same thing.
	A query part is sometimes very long and not suitable to filename,
	so I think it is better to remove it from filename.
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/Request.cc
	* src/Request.h
	* test/HttpRequestTest.cc
	* test/RequestTest.cc
2008-04-27 04:09:08 +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 a7952cce05 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now auto protocol detection is enabled without -Z option.
	But there is a important difference between with/without -Z optoin.

	For example, if you type:
	aria2c http://host/file file1.torrent file2.metalink http://mirror/file
	then, aria2 interprets there are 3 request groups:
	(1) http://host/file, http://mirror/file  <-- multi-source download
	(2) file1.torrent
	(3) file2.metalink

	On the other hand, if you invoke above command with -Z option, it is
	interpreted as 4 request groups:
	(1) http://host/file
	(2) file1.torrent
	(3) file2.metalink
	(4) http://mirror/file

	I think usually user don't mix multi-source URLs and torrent files, so
	there is no big problem here.
	* src/main.cc
2008-04-26 08:12:46 +00:00
Tatsuhiro Tsujikawa 8678e1f380 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that causes segmentaion fault when reading XML 
containing
	unescapsed character like '&'.
	Also a modification was made which avoids adding unnecessary
	characters stack and appending unused string.
	* src/ExpatMetalinkProcessor.cc
	* src/FileMetalinkParserState.h
	* src/FilesMetalinkParserState.h
	* src/FinMetalinkParserState.h
	* src/HashMetalinkParserState.h
	* src/InitialMetalinkParserState.h
	* src/LanguageMetalinkParserState.h
	* src/MetalinkMetalinkParserState.h
	* src/MetalinkParserState.h
	* src/MetalinkParserStateMachine.cc
	* src/MetalinkParserStateMachine.h
	* src/OSMetalinkParserState.h
	* src/PieceHashMetalinkParserState.h
	* src/PiecesMetalinkParserState.h
	* src/ResourcesMetalinkParserState.h
	* src/SizeMetalinkParserState.h
	* src/SkipTagMetalinkParserState.h
	* src/URLMetalinkParserState.h
	* src/VerificationMetalinkParserState.h
	* src/VersionMetalinkParserState.h
	* src/XML2SAXMetalinkProcessor.cc
2008-04-26 07:43:01 +00:00
Tatsuhiro Tsujikawa 90d5b5c0a2 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added StringFormat class, which internally calls vasprintf.
	operator<< is defined for this class, so it can be used with iostream
	classes nicely. SimpleLogger and following functions are rewritten
	using StringFormat class.
	Besides, now Logger class's methods are non-const, many classes
	that has a const Logger* as a member variable are modified to remove
	const qualifier from the variable declaration.
	* src/HelpItemFactory.cc
	* src/Request.cc
	* src/SimpleLogger.cc
	* src/StringFormat.cc
	* src/StringFormat.h
	* src/Util.cc
	* src/option_processing.cc
	* src/version_usage.cc
	* test/StringFormatTest.cc
	* src/*.h: The classes that has const Logger* as a member variable.
2008-04-26 05:58:49 +00:00
Tatsuhiro Tsujikawa 0f92203ffe 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Log error in AccRequestGroup when reading BitTorrent/Metalink 
file is
	failed. Also fixed memory link when exception is thrown there.
	* src/main.cc (AccRequestGroup)
2008-04-26 01:09:56 +00:00
Tatsuhiro Tsujikawa cbc34b4e3a s/Accept-Feature/Accept-Features/ 2008-04-25 17:47:12 +00:00
Tatsuhiro Tsujikawa 2a81fd466d 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added build-in "Accept-Feature" support. For now only "metalink" is
	used in this header field.
	This "metalink" value is removed from the list when connecting URLs
	fed by metalink file to avoid loop in "transparent" metlaink.
	* src/HttpRequest.cc
	* src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Feature
	header is also held in this variable. Also renamed setUserHeaders as
	addHeader and it was rewritten to add header not just to clear the old
	value.
	* src/HttpRequestCommand.cc
	* src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
	from "Accept-Feature" list.
	* src/RequestGroup.cc: Added "metalink" to "Accept-Feature" by default.
	* src/RequestGroup.h
	* src/TaggedItem.cc: Moved Concat class to a2functional.h.
	* src/a2functional.h: Included <string> because Concat class depends on
	it.
	* test/HttpRequestTest.cc
2008-04-25 17:44:03 +00:00
Tatsuhiro Tsujikawa 8ea2f386cb 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added comment
	* src/RequestGroup.cc (createNextCommand)
2008-04-25 16:26:40 +00:00
Tatsuhiro Tsujikawa c3151ba188 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Capitalized METHOD_GET and METHOD_HEAD
	* src/Request.cc
2008-04-25 16:24:34 +00:00
Tatsuhiro Tsujikawa e0877ec26b 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added getDownloadResults() method
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
2008-04-23 10:28:56 +00:00
Tatsuhiro Tsujikawa 4f6df4be39 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that aria2 exits when commands is empty() but
	_routineCommands are not.
	* src/DownloadEngine.cc
2008-04-23 10:03:52 +00:00
Tatsuhiro Tsujikawa da615e4e7a 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use the default value pulled from Option object in 
HelpItemFactory.
	except options whose defualt value is embedded in a usage text.
	* src/HelpItemFactory.cc
	* src/HelpItemFactory.h
	* src/option_processing.cc
	* src/version_usage.cc
2008-04-22 11:26:50 +00:00
Tatsuhiro Tsujikawa c87fe0022d 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --quiet option to make aria2 quiet (no console output).
	--quiet option is tagged with ADVANCED.
	* src/HelpItemFactory.cc
	* src/LogFactory.cc
	* src/LogFactory.h
	* src/MultiUrlRequestInfo.cc
	* src/MultiUrlRequestInfo.h
	* src/NullStatCalc.h: New class. This class prints nothing.
	* src/OptionHandlerFactory.cc
	* src/main.cc
	* src/option_processing.cc
	* src/prefs.h
	* src/usage_text.h
2008-04-22 10:29:48 +00:00
Tatsuhiro Tsujikawa 9c6904f8d4 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Add HTTP tag to --header option. Removed ADVANCED tag instead.
	* src/HelpItemFactory.cc (createHelpItems):
2008-04-22 10:20:11 +00:00
Tatsuhiro Tsujikawa 7f0754c505 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation error in ExpatMetalinkProcessor.cc
	* src/ExpatMetalinkProcessor.cc
2008-04-22 09:12:59 +00:00
Tatsuhiro Tsujikawa 5f55bc197f 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Reuse socket if the origin server supports HTTP keep-alive and
	--enable-http-keep-alive or --enable-http-pipelining is given.
	The current implementation doesn't reuse the connections 
established
	against proxy server.

	* src/AbstractCommand.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/HttpDownloadCommand.cc
	* src/HttpInitiateConnectionCommand.cc
	* src/HttpResponseCommand.cc
2008-04-22 08:52:47 +00:00
Tatsuhiro Tsujikawa 1c7c6f9898 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten HTTP keep-alive and pipelining routine.
	* src/AbstractCommand.cc
	* src/HttpConnection.cc
	* src/HttpDownloadCommand.cc
	* src/HttpRequest.cc
	* src/HttpRequestCommand.cc
	* src/HttpResponseCommand.cc
	* src/Request.cc
	* src/Request.h
	* src/RequestGroup.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/RequestTest.cc
2008-04-22 07:15:35 +00:00
Tatsuhiro Tsujikawa f1816a1d4b 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added missing setUserHeaders call
	* src/HttpRequestCommand.cc
2008-04-21 13:19:01 +00:00
Tatsuhiro Tsujikawa cfe373cbbf 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Call FileAllocationMan::nextFileAllocationEntryExists() first.
	Calling FileAllocationMan::isFileAllocationBeingExecuted() is 
somwhat
	waste of time because it is more likey false.
	* src/FileAllocationDispatcherCommand.cc (execute)
2008-04-21 12:31:10 +00:00
Tatsuhiro Tsujikawa e1fa62e6c7 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now HTTP status and version are a member variable of HttpHeader.
	HTTP status is processed as a string, not integer.
	* src/AbstractProxyResponseCommand.cc
	* src/HttpConnection.cc
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpHeaderProcessor.cc
	* src/HttpHeaderProcessor.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* test/HttpHeaderProcessorTest.cc
	* test/HttpResponseTest.cc
2008-04-21 10:48:11 +00:00
Tatsuhiro Tsujikawa 3eb74629cb 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --header option. You can specify any number of additional 
HTTP headers
	like:
	aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
	Unlike other commad-line option, you can use --header option 
multiple times.
	* src/HelpItemFactory.cc
	* src/HttpRequest.{cc, h}
	* src/HttpRequestCommand.cc
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/option_processing.cc
	* src/prefs.h
	* src/usage_text.h
	* test/HttpRequestTest.cc (testUserHeaders)
2008-04-20 06:30:44 +00:00
Tatsuhiro Tsujikawa c1c5e7369f 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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-04-20 05:42:15 +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 99733a84e2 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed type in man page.
	* doc/aria2c.1.txt
2008-04-15 12:37:15 +00:00
Tatsuhiro Tsujikawa ebed4b6df7 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Merged Ross's 0.13.1+1 Cygwin compile fix patch.
	* src/SimpleLogger.{cc, h}
2008-04-13 13:38:25 +00:00
Tatsuhiro Tsujikawa 846e7c70f5 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented auto protocol detection.
	Now you can do:
	aria2c -Z http://host/file file1.torrent file2.metalink
	(Note: -Z option is required for auto protcol detection.)
	Then aria2c downloads 3 files simultaneously:
	1. http://host/file
	2. file1.torrent <-- read local torrent file
	3. file2.metalink <-- read local Metalink file.

	Same thing goes with -i option. Assume your uris.txt contans:
	http://host/file
	file1.torrent
	file2.metalink
	Then you can do: aria2c -i uris.txt
	(Note: -Z option is not needed if -i option is given.)
	
	* src/main.cc
	* src/ProtocolDetector.{cc, h}
	* test/ProtocolDetectorTest.cc
2008-04-13 13:30:12 +00:00
Tatsuhiro Tsujikawa 0516a07fa6 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error without gnutls/libgcrypt/libgpg-error and 
openSSL
        installed
        * src/ARC4Encryptor.h
        * src/ARC4Decryptor.h
2008-04-13 01:33:48 +00:00
Tatsuhiro Tsujikawa 5f56e52498 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Renamed argument from 'errno' to 'err', since errno is confused 
with
        errno defined in errno.h.
        * src/LibgcryptARC4Decryptor.h
        * src/LibgcryptARC4Context.h
        * src/LibgcryptDHKeyExchange.h
        * src/LibgcryptARC4Encryptor.h
2008-04-13 01:31:53 +00:00
Tatsuhiro Tsujikawa d13c416a94 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten choking algorithm.
	* src/PeerChokeCommand.{cc, h}
	* src/BtInterestedMessage.cc
	* src/PeerSessionResource.{cc, h}
	* src/DefaultPeerStorage.{cc, h}
	* src/BtNotInterestedMessage.cc
	* src/DefaultBtMessageDispatcher.{cc, h}
	* src/BtMessageDispatcher.h
	* src/Peer.{cc, h}
	* src/BtLeecherStateChoke.{cc, h}
	* src/BtSetup.cc
	* src/BtSeederStateChoke.{cc, h}
	* src/PeerStorage.h
	* test/MockPeerStorage.h
	* test/MockBtMessageDispatcher.h
2008-04-13 01:25:36 +00:00
Tatsuhiro Tsujikawa 8b91d22ca4 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation error on x84-64 platform.
	* src/AuthConfig.cc: Included ostream.
2008-04-09 13:32:51 +00:00
Tatsuhiro Tsujikawa d034c4d773 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten getBasename() and getDirname(), without standard 
library
	basename(), dirname().
	* src/File.cc
	* test/FileTest.cc
2008-03-16 09:04:21 +00:00
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
Tatsuhiro Tsujikawa a8eeb81883 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use constants defined in prefs.h
	* src/option_processing.cc
2008-02-21 12:24:06 +00:00
Tatsuhiro Tsujikawa 4b67290f00 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
2008-02-21 02:21:14 +00:00
Tatsuhiro Tsujikawa 0d130b77f4 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Make room for future enchancements for IPv6 addresses.
	Bump up version number of dht.dat file format to 2.
	Not compatible with previous version.
	* src/DHTRoutingTableSerializer.cc
	* src/DHTRoutingTableDeserializer.cc
	* test/DHTRoutingTableSerializerTest.cc
2008-02-21 02:19:55 +00:00
Tatsuhiro Tsujikawa 24b91983e1 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added handling for the return values from
	PeerMessageUtil::createcompact().
	* src/DefaultBtContext.cc (computeFastSet):
2008-02-21 00:56:14 +00:00
Tatsuhiro Tsujikawa 3274b6acc7 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed abort when peer's ip address is IPv4-mapped address.
	* src/DefaultBtContext.cc (computeFastSet)

	Removed number-and-dots criteria, since 
Util::isNumberAndDotsNotation()
	cannot handle IPv4-mapped addresses.
	* src/DefaultBtInteractive.cc (addPeerExchangeMessage)
2008-02-20 17:45:22 +00:00
Tatsuhiro Tsujikawa cfd0a40fdb 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Proper return value handling for OpenSSL functions.
	* src/LibsslDHKeyExchange.h
2008-02-20 17:00:44 +00:00
Tatsuhiro Tsujikawa dd8f18956a 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Random bytes generation using libgcrypt and OpenSSL.
	* src/DHTUtil.{h, cc}
	* test/DHTUtilTest.cc
2008-02-20 16:57:47 +00:00
Tatsuhiro Tsujikawa 1ea9033363 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed segmentation fault when a DHT message which doesn't have 
'y' key
	received.
	* src/DHTMessageReceiver.cc (receiveMessage)
2008-02-20 16:52:09 +00:00
Tatsuhiro Tsujikawa c4aaea3ca2 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that a return code is always 0. BUG#1897704
	If error occurred during the download or there exist unfinished
	downloads, aria2 returns with code 1.
	* src/RequestGroupMan.{h, cc}
	* src/MultiUrlRequestInfo.{h, cc}
	* src/main.cc
2008-02-20 16:46:56 +00:00
Tatsuhiro Tsujikawa 2cc471ebf6 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
IPv6 support for SocketCore class.
	TODO: In SocketCore::establishConnection(), this is insufficient 
to
	determin the failure of connect() here because the socket is
	non-blocking state. The next addresses should be tried after 
select().
	TODO: NameResolver still uses c-ares(<= 1.4) 
ares_gethostbyname().
	If c-ares 1.5 or newer is installed, ares_getaddrinfo() should 
be used
	instead which address family independent.
	TODO: DHTRoutingTable{Deserializer,Serializer} currently saves 
peer
	information in a compact peer format which is for IPv4 only.
	
	Some BitTorrent functions in PeerMessageUtil still depends on 
IPv4 but
	this is a spec of BitTorrent protocol.
	* src/SocketCore.{h, cc}
	* src/PeerMessageUtil.cc
	* test/SocketCoreTest.cc
	* test/PeerMessageUtilTest.cc
	* test/DHTConnectionImplTest.cc

	Handle IPv4-mapped addresses.
	* src/DHTNode.cc: Now identity is determined by node id.
	* src/DHTMessageTrackerEntry.cc

	Because now PeerMessageUtil::unpackcompact() could fail, the 
caller
	should handle it.
	* src/DHTRoutingTableDeserializer.cc
	* src/DHTMessageFactoryImpl.cc
2008-02-20 13:02:48 +00:00
Tatsuhiro Tsujikawa 4708809094 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Change the unit of --stop option from a minute to a second.
	* src/usage_text.h
	* src/DownloadEngineFactory.cc
	* src/OptionHandlerFactory.cc
	* src/message.h
	* src/TimedHaltCommand.cc
2008-02-20 12:33:16 +00:00
Tatsuhiro Tsujikawa 80bc9a8a21 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Make listening socket non-block mode.
	* src/FtpConnection.cc
	* src/FtpNegotiationCommand.{h, cc}
	* src/PeerListenCommand.cc
	
	Fixed the bug that cause slow ftp negotiation.
	* src/FtpNegotiationCommand.{h, cc}
2008-02-19 13:36:39 +00:00
Tatsuhiro Tsujikawa 766e092af3 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added basic tag to --enable-dht, --dht-listen-port option.
	* src/HelpItemFactory.cc (createHelpItems)
2008-02-19 12:05:21 +00:00
Tatsuhiro Tsujikawa c87b6b2984 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated text.
	* src/usage_text.h
2008-02-18 17:37:54 +00:00
Tatsuhiro Tsujikawa 1d0175a29e 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/MSEHandshake.cc (encryptAndSendData): Use std::min().
2008-02-18 17:13:20 +00:00
Tatsuhiro Tsujikawa 3c41ea24bf 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Determin _threadtholdSpeed in each constructor for
	ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
	* src/ActivePeerConnectionCommand.{h, cc}
	* src/PeerReceiveHandshakeCommand.{h, cc}
	* src/BtSetup.cc
	* src/BtConstants.h
2008-02-18 17:11:44 +00:00
Tatsuhiro Tsujikawa 20cd2e5246 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --bt-min-crypto-level and --bt-require-crypto options.
	* src/OptionHandlerFactory.cc
	* src/MSEHandshake.cc
	* src/HelpItemFactory.cc
	* src/option_processing.cc
	* src/ReceiverMSEHandshakeCommand.cc
	* src/prefs.h
	* src/DefaultBtAnnounce.cc
	* src/InitiatorMSEHandshakeCommand.cc
	* src/usage_text.h
	* test/MSEHandshakeTest.cc
2008-02-18 13:41:58 +00:00
Tatsuhiro Tsujikawa c37539eb25 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump version number to 0.13.0b
	* configure.ac
2008-02-17 16:17:26 +00:00
Tatsuhiro Tsujikawa b7e841e885 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated doc.
	* src/MessageDigestHelper.h:
2008-02-17 16:12:47 +00:00
Tatsuhiro Tsujikawa ebd524b6a2 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use raw message digest as a token instead of its hexadecimal
	representation.
	* src/DHTTokenTracker.cc (generateToken)
2008-02-17 16:10:10 +00:00
Tatsuhiro Tsujikawa c0d2223c77 2008-02-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added Message Stream Encryption(MSE) support.
	Currently, aria2 accepts incoming connections with Obfuscation Header
	and legacy BitTorrent Header and establishes connections with
	Obfuscation Header first and if failed then retry with legacy
	BitTorrent header. If plain text and ARC4 is provided, aria2 always
	choose ARC4. The new option to change the default behavior is planned.
	For tracker extension, "supportcrypto=1" is added statically.
	* src/PeerInitiateConnectionCommand.{h, cc}
	* src/PeerConnection.{h, cc}
	* src/HandleRegistry.h
	* src/SocketCore.h
	* src/PeerReceiveHandshakeCommand.{h, cc}
	* src/BtRegistry.{h, cc}
	* src/PeerListenCommand.cc
	* src/InitiatorMSEHandshakeCommand.{h, cc}
	* src/ReceiverMSEHandshakeCommand.{h, cc}
	* src/MSEHandshake.{h, cc}
	* src/ARC4Encryptor.h
	* src/ARC4Decryptor.h
	* src/LibgcryptARC4Encryptor.h
	* src/LibgcryptARC4Decryptor.h
	* src/LibgcryptARC4Context.h
	* src/LibsslARC4Encryptor.h
	* src/LibsslARC4Decryptor.h
	* src/LibsslARC4Context.h
	* src/DHKeyExchange.h
	* src/LibgcryptDHKeyExchange.h
	* src/LibsslDHKeyExchange.h
	* src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
	* test/DefaultBtAnnounceTest.cc
	* test/ARC4Test.cc
	* test/DHKeyExchangeTest.cc
	
	Removed prepareForRetry() because it is not used.
	* src/PeerAbstractCommand.{h, cc}
	* src/PeerInteractionCommand.{h, cc}
	* src/PeerInitiateConnectionCommand.{h, cc}
2008-02-17 15:56:47 +00:00
Tatsuhiro Tsujikawa 1302123368 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the ability to load nodes from torrent file. These nodes are
	added to the routing table when downloading that torrent.
	* src/BtContext.h
	* src/DefaultBtContext.{h, cc}
	* src/DHTSetup.cc
	* src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
	hostname and port pair, and resolves all of them.
	* src/NameResolver.{h, cc}: Added reset().
	* src/RequestGroup.cc	
	* test/DefaultBtContextTest.cc 
	* test/MockBtContext.h
	
	Removed assert() from DefaultBtContext and throw exception instead.
	* src/DefaultBtContext.cc
2008-02-13 15:17:08 +00:00
Tatsuhiro Tsujikawa bfcc300670 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed segmentation fault bug when exiting if dht is disabled.
	* src/RequestGroup.cc
2008-02-12 13:49:39 +00:00
Tatsuhiro Tsujikawa bc1f1bdf35 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed typo in log message and define the message in message.h
	* src/TimedHaltCommand.cc
	* src/message.h
2008-02-12 13:45:54 +00:00
Tatsuhiro Tsujikawa 1700f5c1bc 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Included RecoverableException.h to fix compilation error.
	* test/DHTMessageFactoryImplTest.cc
2008-02-11 13:41:16 +00:00
Tatsuhiro Tsujikawa bebb7e1976 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added test 'testDoReceivedAction' for DHTQueryMessage 
subclasses.
	* test/DHTPingMessageTest.cc
	* test/DHTGetPeersMessageTest.cc
	* test/DHTFindNodeMessageTest.cc
	* test/DHTAnnouncePeerMessageTest.cc
	* test/MockDHTMessage.h
	* test/MockDHTMessageFactory.h
	* test/MockDHTMessageDispatcher.h: New class.
2008-02-11 12:32:46 +00:00
Tatsuhiro Tsujikawa e9f980afc7 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
	virtual.
	* src/DHTMessageDispatcher.h
	* src/DHTMessageDispatcherImpl.{h, cc}
	* src/DHTSetup.cc
2008-02-11 07:50:35 +00:00
Tatsuhiro Tsujikawa 413cbe192b 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Adding handling of DHT error message. Just log error message and
	throw exception.
	* src/DHTMessageFactoryImpl.cc
	* test/DHTMessageFactoryImplTest.cc
2008-02-11 06:23:01 +00:00
Tatsuhiro Tsujikawa 34e6a1dc9a 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added handling of dynamic cast failure.
	* src/DHTNodeLookupTask.cc
	* src/DHTPeerLookupTask.cc
2008-02-11 05:54:08 +00:00
Tatsuhiro Tsujikawa 9c277148b9 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the ability to stop aria2 itself when given time has 
passed
	from start. Use --stop option to specify time in minutes.
	When 0 is given, this feature is disabled.
	* src/OptionHandlerFactory.cc
	* src/TimeBasedCommand.h: Make _interval protected scope.
	* src/HelpItemFactory.cc
	* src/option_processing.cc
	* src/prefs.h
	* src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
	before calling RequestGroupMan::fillRequestGroupFromReserver().
	Without this modification, the result list shows "ERR" when 
aria2 is
	stopped by --stop option. It should be "INPR".
	* src/DownloadEngine.{h, cc}
	* src/DownloadEngineFactory.cc
	* src/usage_text.h
	* src/TimedHaltCommand.{h, cc}: New class.
2008-02-11 05:07:08 +00:00
Tatsuhiro Tsujikawa 5d6f1c046a 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bootstrap through node added by port message.
	Currently bootstrap is executed if the number of buckets in routing
	table is 1.
	* src/BtPortMessage.{h, cc}
	* src/DefaultBtMessageFactory.{h, cc}
	* src/PeerInteractionCommand.cc
	* test/BtPortMessageTest.cc
	* test/MockDHTTask.h
2008-02-10 15:57:00 +00:00
Tatsuhiro Tsujikawa c064a2cd9e 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Extract the Peer class's member variables, which are only needed 
after
	PeerInteractionCommand, into PeerSessionResource class.
	This class is instantiated in PeerInteractionCommand class's 
ctor and
	released in its dtor.
	This will make Peer class lightweight and uses less memory for 
peers
	which are not connected and wait in the queue.
	* src/PeerChokeCommand.cc
	* src/PeerSessionResource.{h, cc}
	* src/PeerInteractionCommand.cc
	* src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() 
function.
	* src/DefaultBtInteractive.cc
	* src/BtPieceMessage.cc
	* src/BtInterestedMessage.cc
	* src/BtUnchokeMessage.cc
	* src/DefaultPeerStorage.{h, cc}
	* src/PeerInitiateConnectionCommand.cc
	* src/ActivePeerConnectionCommand.cc
	* src/BtNotInterestedMessage.cc
	* src/DefaultBtMessageDispatcher.cc
	* src/BtChokeMessage.cc
	* src/BtRequestMessage.cc
	* src/Peer.{h, cc}
	* src/BtRegistry.h
	* src/TrackerWatcherCommand.cc
	* src/PeerReceiveHandshakeCommand.cc
	* test/BtExtendedMessageTest.cc
	* test/BtAllowedFastMessageTest.cc
	* test/BtCancelMessageTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/BtBitfieldMessageTest.cc
	* test/BtHaveMessageTest.cc
	* test/BtNotInterestedMessageTest.cc
	* test/BtRequestMessageTest.cc
	* test/PeerSessionResourceTest.cc
	* test/DefaultBtMessageDispatcherTest.cc
	* test/PeerTest.cc
	* test/BtInterestedMessageTest.cc
	* test/BtRejectMessageTest.cc
	* test/BtChokeMessageTest.cc
	* test/DefaultPeerStorageTest.cc
	* test/BtHaveNoneMessageTest.cc
	* test/BtHaveAllMessageTest.cc
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/BtUnchokeMessageTest.cc
	* test/DefaultBtMessageFactoryTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/UTPexExtensionMessageTest.cc
	* test/DefaultBtRequestFactoryTest.cc
	* test/BtPieceMessageTest.cc
	
	Removed typedef PeerStats.
	* src/PeerStat.h
	* src/SegmentMan.cc
2008-02-09 17:14:40 +00:00
Tatsuhiro Tsujikawa 04a7052013 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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 18:39:26 +00:00
Tatsuhiro Tsujikawa f38eb15ca9 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Only add socket to DownloadEngine's select routine when peer or
	localhost is unchoked and interested. This lowers CPU usage a
	little bit.
	* src/PeerInteractionCommand.cc
	* src/PeerAbstractCommand.{h, cc}
	* src/BtInteractive.h
	* src/DefaultBtInteractive.{h, cc}
2008-02-08 18:27:28 +00:00
Tatsuhiro Tsujikawa 9ab0ece87f 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Revert previous change because get_peers message is needed for
	announce_peer anyway.	
	* src/DHTGetPeersCommand.cc
2008-02-08 18:21:19 +00:00
Tatsuhiro Tsujikawa f1d786469c 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Request peers thought DHT only when download hasn't finished.
	* src/DHTGetPeersCommand.cc
2008-02-08 16:17:07 +00:00
Tatsuhiro Tsujikawa 6fe7b7c8f3 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Force refresh bucket when startup if certain time has 
passed(currently 15 minutes).
	* src/DHTBucketRefreshTask.{h, cc}
	* src/DHTSetup.cc
2008-02-08 16:11:21 +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 d82e183d34 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Create directory before saving DHT routing table.
	Now ios::failure is now handled properly.
	* src/DHTAutoSaveCommand.cc
2008-02-05 17:38:24 +00:00
Tatsuhiro Tsujikawa 7b0a940ab4 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed unnecessary cerr.
	* src/DownloadEngine.cc
2008-02-05 14:16:58 +00:00
Tatsuhiro Tsujikawa bdb1a25ca7 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Catch exception inside DHTMessageReceiver::receiveMessage().
	Log unknown message.
	* src/DHTMessageReceiver.{h, cc}
	* src/DHTMessageFactory.h
	* src/DHTMessageFactoryImpl.{h, cc}
	* src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
	* src/DHTInteractionCommand.cc
	* src/DHTUnknownMessage.{h, cc}
	* test/DHTUnknownMessageTest.cc
	* test/MockDHTMessageFactory.h
2008-02-05 14:15:50 +00:00
Tatsuhiro Tsujikawa 20621d011d 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Commented out ip address comparison because a host can have 
multiple
	ip addresses and it is hard to predict the hostname is resolved 
into
	which one.
	* test/SocketCoreTest.cc (testWriteAndReadDatagram)
2008-02-02 13:06:55 +00:00
Tatsuhiro Tsujikawa af471b931e 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* po/Makefile.in: Removed since this is generated by configure.
2008-02-02 11:28:07 +00:00
Tatsuhiro Tsujikawa 79764a1f11 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compiler warning about redefinition of SIZE_MAX.
	Use common.h instead of config.h directly here.
	* src/Platform.{h, cc}

	The check of ENABLE_NLS is made in gettext.h, so it is not 
required
	here.
	* common.h
	
2008-02-02  gettextize  <bug-gnu-gettext@gnu.org>

	Updated gettext related files.
	* configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
2008-02-02 04:38:24 +00:00
Tatsuhiro Tsujikawa 0f13363229 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added DHT functionality, compatible with mainline.
	DHT is disabled by default. To enable it, give --enable-dht to 
aria2c.
	You may need to specify entry point to DHT network using
	--dht-entry-point. DHT uses UDP port to listen incoming message.
	Use --dht-listen-port to specify port number. Make sure that 
your
	firewall configuration can pass through UDP traffic to the port.
	The routing table is saved in $HOME/.aria2/dht.dat.
	* src/DHT*
	* src/BNode.{h, cc}
	* src/PeerInteractionCommand.cc: enable DHT functionality for a
	particular torrent.
	* src/Data.cc: Rewritten ctor.
	* src/OptionHandlerFactory.cc: Added --enable-dht, 
--dht-listen-port,
	--dht-entry-point.
	* src/DefaultBtInteractive.cc: Send port message if dht is 
enabled.
	* src/RequestGroup.cc: Initialize DHT functionality. When 
download
	ends, remove BtContext from DHTPeerAnnounceStorage.
	* src/BtPortMessage.{h, cc}: Rewritten.
	* src/message.h
	* src/OptionHandlerImpl.cc
	* src/option_processing.cc: Added --enable-dht, 
--dht-listen-port,
	--dht-entry-point.
	* src/Dictionary.{h, cc} (remove): New function.
	* src/prefs.h
	* src/DefaultBtMessageFactory.h
	* src/BtHandshakeMessage.cc
	* src/ActivePeerConnectionCommand.cc
	* src/SocketCore.{h, cc}: Added datagram socket support.
	* src/DefaultBtMessageFactory.cc
	* src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
	Create DHT commands.
	* src/BtMessageFactory.h
	* src/PeerMessageUtil.{h, cc}
2008-02-01 17:36:33 +00:00
Tatsuhiro Tsujikawa 0bce06348e 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that log file is not written when configuration 
file doesn't exist.
	This is caused by using Logger class before LogFactory is not 
configured.
	BUG #1875079
	* src/option_processing.cc

	Warning message "configuration doesn't exist" is only printed 
when --conf is
	given.
	* src/option_processing.cc
2008-01-20 15:20:16 +00:00
Tatsuhiro Tsujikawa a548f956fe 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use BencodeVisitor and MessageDigestHelper instead of 
ShaVisitor.
	ShaVisitor is now deprecated and slated to be removed.
	* src/DefaultBtContext.cc
2008-01-11 15:47:31 +00:00
Tatsuhiro Tsujikawa 160d5a8614 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Externalize message to message.h
	* src/Platform.cc
	* src/message.h
2008-01-11 15:32:45 +00:00
Tatsuhiro Tsujikawa c1bc357d79 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Set default domain and default path to cookie.
	* src/HttpResponse.cc
	* src/CookieBox.{h, cc}
	* src/CookieParser.{h, cc}
	* test/CookieParserTest.cc
2008-01-11 15:20:35 +00:00
Tatsuhiro Tsujikawa eafabe2d44 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --no-conf and --conf-path command-line option.
	--no-conf option disables loading aria2.conf file.
	--conf-path option changes the configuration file path. The 
default
	file path is $HOME/.aria2/aria2.conf
	Added a warning message when the configuration file is not 
found.
	* src/HelpItemFactory.cc
	* src/option_processing.cc
	* src/prefs.h
	* src/usage_text.h
2008-01-11 14:50:34 +00:00
Tatsuhiro Tsujikawa 08a8d8aae2 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the message to inform users that other help categories are
	available in -h option.
	* src/version_usage.cc
	* src/TagContainer.{h, cc}
	* test/TagContainerTest.cc
	* src/TaggedItem.{h, cc}
	* test/TaggedItemTest.cc
	* src/HelpItem.h
2008-01-11 14:10:42 +00:00
Tatsuhiro Tsujikawa 1a4100cbc9 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added Piece::getFirstMissingBlockIndexWithoutLock() and it is 
called
	from PiecedSegment's ctor.
	Previously Piece::getAllMissingBlockIndexes() is called from
	PiecedSegment() but it is rather expensive since only first 
element is
	used.
	* src/PiecedSegment.cc
	* src/Piece.{h, cc}
2008-01-11 13:37:46 +00:00
Tatsuhiro Tsujikawa 83c82f3ec2 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten get*Missing*Index functions. Now no need to allocate 
memory
	each time these functions are called.
	* src/BitfieldMan.{h, cc}
	* test/BitfieldManTest.cc
	* src/array_fun.h
	* test/array_funTest.cc 

	Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
	Added new BitfieldMan::countFilteredBlock() to get the number of 
blocks
	filtered. Removed unnecessary cast to int32_t.
	* src/BitfieldMan.{h, cc}
2008-01-11 13:32:00 +00:00
Tatsuhiro Tsujikawa 5b8358b4d5 I forgot to commit PeerConnection.h
2008-01-10  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>

	Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
	payload length(4bytes) are received. This happens because lenbufLength
	is not updated in this particular case and successive call of
	receiveMessage() overwrites payload length with bytes recieved which
	are payload body.
	* src/PeerConnection.{h, cc}
	* src/message.h
2008-01-10 15:22:55 +00:00
Tatsuhiro Tsujikawa 9a7fe58c57 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
	payload length(4bytes) are received. This happens because lenbufLength
	is not updated in this particular case and successive call of
	receiveMessage() overwrites payload length with bytes recieved which
	are payload body.
	* src/PeerConnection.cc
	* src/message.h
2008-01-10 15:12:32 +00:00
Tatsuhiro Tsujikawa f412691770 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
	peer if there are peers that have same ipaddr and port.
	I've experiened segmentation fault and "pure virtual function was
	called" error.
	* src/Peer.h
	* test/PeerTest.cc
	* src/DefaultPeerStorage.cc
	* test/DefaultPeerStorageTest.cc
2008-01-10 14:59:11 +00:00
Tatsuhiro Tsujikawa b1b20abe02 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed a call to isPowerOf() because it is no longer necessary 
here
	and a request block is not always power of 2.
	BUG#1866924
	* src/PeerMessageUtil.cc (checkLength)
2008-01-09 12:34:48 +00:00
Tatsuhiro Tsujikawa da84d3cf83 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that always first found Segment is removed from
	usedSegmentEntries. Removed unused functions.
	* src/SegmentMan.{h, cc}
	* test/SegmentManTest.cc

	Fixed the bug that ServerHost is not removed.
	* src/RequestGroup.cc
2008-01-06 16:37:25 +00:00
Tatsuhiro Tsujikawa 574e1b3db8 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that SegmentMan::completeSegment() is not called
	even if Segment is complete when --lowest-speed-limit is 
enabled.
	BUG#1864525
	* src/DownloadCommand.{h, cc}
2008-01-06 16:32:52 +00:00
Tatsuhiro Tsujikawa 6ab2962655 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed: hash algorithm 'sha1' is always used. 
	* src/DownloadCommand.cc (validatePieceHash)
2008-01-06 12:01:17 +00:00
Tatsuhiro Tsujikawa eb718cfda0 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --enable-peer-exchange command-line option.
	* src/OptionHandlerFactory.cc
	* src/HelpItemFactory.cc
	* src/option_processing.cc
	* src/usage_text.h
2008-01-05 16:02:25 +00:00
Tatsuhiro Tsujikawa e5e75ee4ed 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Move extension from BtRuntime to ExtensionMessageFactory, because
	extension can be specified per peer, not per torrent.
	* src/DefaultBtInteractive.cc
	* src/BtRuntime.h
	* src/ExtendedMessagingAware.h
	* src/ExtensionMessageFactory.h
	* src/DefaultExtensionMessageFactory.cc
	* test/DefaultExtensionMessageFactoryTest.cc
2008-01-05 15:51:21 +00:00
Tatsuhiro Tsujikawa fce7b4b32f 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added categorized option help. Specify category using --help 
option.
	Also added the ability to search options in forward match.
	* src/HelpItem.{h, cc}
	* test/HelpItemTest.cc
	* src/HelpItemFactory.{h, cc}
	* src/TagContainer.{h, cc}
	* test/TagContainerTest.cc
	* src/option_processing.cc
	* src/prefs.h
	* src/TaggedItem.{h, cc}
	* test/TaggedItemTest.cc
	* src/version_usage.cc
	* src/help_tags.h
	* src/usage_text.h
2008-01-05 11:26:56 +00:00
Tatsuhiro Tsujikawa da4d9092b2 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed segmentation fault when bad torrent metainfo is parsed.
	Added dynamic_cast properly to detect the misconfiguration of 
metainfo
	and then throw exception or skip it.
	* src/DefaultBtContext.{h, cc}
	* test/DefaultBtContextTest.cc
	* src/AnnounceList.cc
	* src/CompactPeerListProcessor.cc
	* src/message.h
	* src/DefaultBtAnnounce.{h, cc}
	* test/DefaultBtAnnounceTest.cc
	* src/BencodeVisitor.cc
2008-01-04 12:31:49 +00:00
Tatsuhiro Tsujikawa 853a8ef6aa 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added missing "B"(=Byte). So now the message looks like this:
	Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB	
	* src/message.h (MSG_SHARE_RATIO_REPORT)
2007-12-29 07:17:51 +00:00
Tatsuhiro Tsujikawa 564e8e75fa 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Show the seed ratio after torrent downloads.
	For example, after torrent download completed and --seed-time 
and
	--seed-ratio conditions are fulfilled, following message is 
printed
	right after "Download complete: .....":
	Your share ratio was 1.0, uploaded/downloaded=12M/12M
	* src/RequestGroupMan.cc
	* src/RequestGroup.{h, cc}
	* src/message.h
2007-12-29 07:02:35 +00:00
Tatsuhiro Tsujikawa 16722b559d 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Remove a defunct control file. A defunct control file means that 
while
	it exists, but the corresponding download file is missing.
	After its removal, a download restarts from the beginning.
	* src/RequestGroup.cc
	* src/message.h
2007-12-26 15:11:42 +00:00
Tatsuhiro Tsujikawa e39f7a7e9c 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Allocate bitfield in Peer when it is really used. More 
specifically,
	bitfield in Peer is allocated after the connection is 
established and
	deallocated when the connection is dropped.
	Since 2 parameters(piece length and total length) was removed 
from the
	constructor of Peer class, many test classes were modified 
accordingly.
	See svn log for more detailed information.
	* src/PeerInteractionCommand.cc
	* src/CompactPeerListProcessor.cc
	* src/Peer.cc
	* src/DefaultPeerListProcessor.cc
	* src/PeerListenCommand.cc
	* src/PeerReceiveHandshakeCommand.cc

	Fixed memory leak
	* src/Piece.cc
2007-12-26 14:26:55 +00:00
Tatsuhiro Tsujikawa eed41706fc 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
	lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
	command-line options.
	* src/option_processing.cc
	* src/ActivePeerConnectionCommand.cc
2007-12-25 12:40:45 +00:00
Tatsuhiro Tsujikawa e707ba0a6c 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Send have message to peer if it already has the piece.
	* src/BtHaveMessage.{h, cc}
2007-12-25 12:37:50 +00:00
Tatsuhiro Tsujikawa 20eb571ba1 Forgot to commit src/PeerReceiveHandshakeCommand.cc
2007-12-25  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>

	Removed incomingPeer. Set 0 to peer's port if it is not a listening
	port.
	* src/DefaultPeerStorage.{h, cc}
	* test/DefaultPeerStorageTest.cc
	* src/HandshakeExtensionMessage.cc
	* test/HandshakeExtensionMessageTest.cc
	* src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
	* src/PeerStorage.h
	* test/MockPeerStorage.h
	* src/PeerListenCommand.cc
	* src/PeerReceiveHandshakeCommand.cc
2007-12-25 12:35:54 +00:00
Tatsuhiro Tsujikawa f5b68379d5 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed incomingPeer. Set 0 to peer's port if it is not a listening
	port.
	* src/DefaultPeerStorage.{h, cc}
	* test/DefaultPeerStorageTest.cc
	* src/HandshakeExtensionMessage.cc
	* test/HandshakeExtensionMessageTest.cc
	* src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
	* src/PeerStorage.h
	* test/MockPeerStorage.h
	* src/PeerListenCommand.cc
2007-12-25 12:34:23 +00:00
Tatsuhiro Tsujikawa 7ff1f5a620 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --metalink-enable-unique-protocol option.
	* src/Metalink2RequestGroup.cc
	* src/option_processing.cc
	* src/prefs.h
	* src/version_usage.cc
	* doc/aria2c.1.txt
	* doc/aria2c.1
2007-12-22 06:40:58 +00:00
Tatsuhiro Tsujikawa 51cb6b5ba9 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Allow a peer in incomingPeer to be added peers.
	* src/DefaultPeerStorage.cc
	* test/DefaultPeerStorageTest.cc
2007-12-22 06:08:58 +00:00
Tatsuhiro Tsujikawa ccd4a35096 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that causes aria2 not to finish download. 
BUG#1855875.
	I could reproduce this bug in following procedure:
	1. Stop the download at the very beginning(1% or 100KB 
downloaded).
	2. Restart aria2.
	3. You see the download stopped around 99%.
	* src/HttpResponseCommand.cc (handleDefaultEncoding)
	* src/StreamFileAllocationEntry.cc: Removed the timeout 
handling.
	If timeout is reached, then _nextCommand is unused and it may 
contains
	segments and they won't be canceled. Actually, timeout is not 
needed
	here because if the server dropped connection, then retry is 
made.
2007-12-22 05:45:59 +00:00
Tatsuhiro Tsujikawa 286f34cb3f 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added uTorrent compatible Peer Exchange.
	* src/BencodeVisitor.{h, cc}
	* test/BencodeVisitorTest.cc
	* src/BtConstants.h
	* src/BtContext.h: Added 'private' flag.
	* src/BtExtendedMessage.{h, cc}
	* test/BtExtendedMessageTest.cc
	* src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
	reserved field.
	* test/BtHandshakeMessageTest.cc
	* src/BtMessageFactory.h
	* src/BtRegistry.h
	* src/BtRuntime.h: This class holds default extension message 
IDs for
	aria2. By default, aria2 uses ID 8 for ut_pex.
	* src/DefaultBtContext.cc
	* src/DefaultBtInteractive.{h, cc}: This class holds 
_utPexEnabled.
	When it is true, aria2 enables ut_pex. This value is set by
	PeerInteractionCommand.
	* src/DefaultBtMessageFactory.{h, cc}
	* test/DefaultBtMessageFactoryTest.cc
	* src/DefaultBtMessageReceiver.cc: Moved the code of fast 
extension
	handling to DefaultBtInteractive class.
	* src/DefaultExtensionMessageFactory.{h, cc}
	* test/DefaultExtensionMessageFactoryTest.cc
	* src/DefaultPeerStorage.cc: Returns false if a peer is already 
in
	the container(peers and incomingPeers. The equality is 
determined by
	Peer::id).
	* test/DefaultPeerStorageTest.cc
	* src/ExtensionMessage.h
	* test/MockExtensionMessage.h
	* src/ExtensionMessageFactory.h
	* test/MockExtensionMessageFactory.h
	* src/HandshakeExtensionMessage.{h, cc}
	* test/HandshakeExtensionMessageTest.cc
	* src/MetaEntry.h
	* src/Peer.{h, cc}
	* src/PeerInteractionCommand.cc
	* src/PeerReceiveHandshakeCommand.cc: Evaluate the return value 
of
	addIncomingPeer.
	* src/PeerMessageUtil.{h, cc}
	* src/PeerObject.h
	* src/UTPexExtensionMessage.{h, cc}
	* test/UTPexExtensionMessageTest.cc
	* src/message.h
	* src/prefs.h

	Fixed the bug that returns incomplete data when it contains null
	character. A convenient constructor was also added.
	* src/Data.{h, cc}

	Rewritten.
	* src/CompactPeerListProcessor.cc

	Fixed typos.
	* src/message.h
	* src/MetaFileUtil.cc
2007-12-22 03:57:55 +00:00
Tatsuhiro Tsujikawa c25f4cffc0 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added "Status Legend" label to the explanation text of 'stat' in
	download result and moved it to the last. BUG#1848214
	* src/RequestGroupMan.cc
2007-12-15 16:29:26 +00:00
Tatsuhiro Tsujikawa d1d653abf3 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that -lexpat is always added to aria2c_LDADD.
	* src/Makefie.am
	* test/Makefile.am
2007-12-15 15:52:02 +00:00
Tatsuhiro Tsujikawa 1e63b1cda5 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that prevents aria2 from loading cookie file when 
expire
	value is greater than 2^31-1. BUG#1851066
	* src/CookieBoxFactory.cc
	* test/CookieBoxFactoryTest.cc
2007-12-15 14:34:31 +00:00
Tatsuhiro Tsujikawa 3ea4fe447a 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed possible memory leak when an exception is thrown.
	* src/XML2SAXMetalinkProcessor.cc

	Added Expat support. If both libxml2 and Expat are installed, 
then
	libxml2 is used by default.
	MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor 
and
	ExpatMetalinkProcessor according to the configuration.
	* src/ExpatMetalinkProcessor.{h, cc}
	* src/main.cc: Removed libxml2 specific header and init/free 
function.
	* src/MetalinkProcessorFactory.{h, cc}
	* src/MetalinkHelper.cc
	* src/Metalinker.h: Removed unnecessary libxml2 header.
	* src/MetalinkProcessor.h
	* test/XML2SAXMetalinkProcessorTest.cc: Removed because
	MetalinkProcessorTest is used instead.
	* test/MetalinkProcessorTest.cc: Added. It is actually the same 
with
	XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
	MetalinkProcessorFactory::newInstance().
	* m4/libexpat.m4
	* configure.ac: Added configuration options for libexpat.
2007-12-14 00:46:32 +00:00
Tatsuhiro Tsujikawa e07ee38ed1 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Disabled -s option in metalink download.
	* src/Metalink2RequestGroup.cc
2007-12-12 14:08:19 +00:00
Tatsuhiro Tsujikawa fca7b9d7e4 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
If several protocols are available for a mirror, aria2 now use 
one of
	them. --metalink-preferred-protocol option was added to specify 
the
	preference of protocol.
	* src/AbstractCommand.cc
	* src/OptionHandlerFactory.cc
	* src/ServerHost.{h, cc}
	* src/Metalink2RequestGroup.cc
	* src/RequestGroup.{h, cc}
	* test/RequestGroupTest.cc
	* src/option_processing.cc
	* src/prefs.h
	* src/HttpResponseCommand.cc
	* src/MetalinkResource.{h, cc}
	* src/FtpNegotiationCommand.cc
	* src/MetalinkEntry.{h, cc}
	* src/MetalinkEntryTest.cc
2007-12-12 13:53:33 +00:00
Tatsuhiro Tsujikawa ae2555313b 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Code cleanup and added debug log.
	* src/PeerConnection.cc
2007-12-12 13:49:09 +00:00
Tatsuhiro Tsujikawa 7d62e1877e 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Compiler error fix: applied the patch by Tiziano Mueller
	* src/RequestGroup.cc
2007-12-10 14:01:21 +00:00
Tatsuhiro Tsujikawa b482568d59 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug: only first announce URL is tried in AnnounceTier,
	in stopped and completed event.
	* src/AnnounceList.{h, cc}
	* test/AnnounceListTest.cc
	* src/DefaultBtAnnounce.cc
	* test/DefaultBtAnnounceTest.cc

	Sorted URLs.
	* test/Metalink2RequestGroupTest.cc
2007-12-09 15:54:54 +00:00
Tatsuhiro Tsujikawa 4b5ad58219 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation warnings
	* test/DataTest.cc
	* test/HttpRequestTest.cc
	* test/MetaFileUtilTest.cc
	* test/RequestTest.cc
2007-12-08 16:57:32 +00:00
Tatsuhiro Tsujikawa 2fe11ac548 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed unnecessary string copy. Updated doc and corrected indentation.
	* src/Base64.cc
	
	* Release 0.12.0
2007-12-08 16:55:44 +00:00
Tatsuhiro Tsujikawa 059406ae50 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Release 0.12.0
2007-12-08 15:14:26 +00:00
Tatsuhiro Tsujikawa ecb0846c34 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated translations
	* po/{de,fr,ja,nl,ru}.po
	
	Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
	translations. Many thanks to translators.
	* po/{ca,es,it,pt_BR,sv}.po
	* po/LINGUAS
2007-12-08 15:12:42 +00:00
Tatsuhiro Tsujikawa 5941a00f65 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added a notice about URL
	* src/version_usage.cc
2007-12-08 10:48:51 +00:00
Tatsuhiro Tsujikawa bb4bff2c2a 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
Fixed the bug#1845750; CTRL+C does not stop torrent.
	aria2 repeatedly sends stopped request when tracker returns error code.
	* src/AnnounceList.cc
	* test/AnnounceListTest.cc
	* src/AnnounceTier.h

	Added a message when ctrl-c is hit.
	Now second ctrl-c is also handled in signal handler.
	* src/RequestGroupMan.{h, cc}
	* src/RequestGroup.{h, cc}
	* src/MultiUrlRequestInfo.cc
	* src/DownloadEngine.cc
	* src/TrackerWatcherCommand.cc
2007-12-07 13:33:59 +00:00
Tatsuhiro Tsujikawa 3bb307b518 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Code cleanup
	* src/Base64.cc (encode)
2007-12-06 12:37:56 +00:00
Tatsuhiro Tsujikawa 68579bd2f4 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed Direct/IO enable/disable procesure in file allocation routine.
	* src/SingleFileAllocationIterator.cc
	(SingleFileAllocationIterator):
	Disable directIO if offset is not multiple of 512.
	(~SingleFileAllocationIterator): Removed a call to disableDirectIO.
	* src/MultiFileAllocationIterator.cc (allocateChunk):
	Enable created SingleFileAllocationIterator's directIO.
	* src/FileAllocationEntry.cc
	(FileAllocationEntry): Enable directIO here.
	(~FileAllocationEntry): Disable directIO here.
2007-12-06 12:32:27 +00:00
Tatsuhiro Tsujikawa 30739b0763 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
	* src/Peer.{h, cc}
	* src/DefaultPieceStorage.cc
	* test/DefaultPieceStorageTest.cc
2007-12-05 17:57:08 +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