Commit Graph

969 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
2c6d2cd562 2008-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Replaced HelpItem.cc with OptionHandler.cc.
	* po/POTFILES.in
	
	Updated po files with 'make update-po'
	* po/aria2c.pot
	* po/*.po
2008-09-22 10:35:53 +00:00
Tatsuhiro Tsujikawa
7cceaa9340 2008-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed possible values from the text.
	* src/usage_text.h (TEXT_METALINK_PREFERRED_PROTOCOL)
2008-09-22 10:31:00 +00:00
Tatsuhiro Tsujikawa
77e095300b 2008-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed unused preferences:
	PREF_NO_PREALLOCATION
	PREF_STDOUT_LOG
	PREF_TRACKER_MAX_TRIES
	PREF_DIRECT_DOWNLOAD_TIMEOUT
	PREF_MIN_SEGMENT_SIZE
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
2008-09-22 10:12:44 +00:00
Tatsuhiro Tsujikawa
f66ed483fa 2008-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Integrated HelpItem into OptionParser to ease the workload for 
adding
	new options. Removed default value from usage text.
	* src/HelpItem.cc: Removed.
	* src/HelpItem.h: Removed.
	* src/HelpItemFactory.cc: Removed.
	* src/HelpItemFactory.h: Removed.
	* src/Makefile.am
	* src/Makefile.in
	* src/NameMatchOptionHandler.h
	* src/OptionHandler.cc
	* src/OptionHandler.h
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/OptionParser.cc
	* src/OptionParser.h
	* src/TagContainer.cc: Removed.
	* src/TagContainer.h: Removed.
	* src/TaggedItem.cc: Removed.
	* src/TaggedItem.h: Removed.
	* src/main.cc
	* src/option_processing.cc
	* src/usage_text.h
	* src/version_usage.cc
	* test/HelpItemTest.cc: Removed.
	* test/Makefile.am
	* test/Makefile.in
	* test/OptionHandlerTest.cc
	* test/OptionParserTest.cc
	* test/TagContainerTest.cc: Removed.
2008-09-22 09:26:57 +00:00
Tatsuhiro Tsujikawa
f6aaa094a8 2008-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Moved `TransferStat stat = ...' to inside the `if' clause.
	* src/RequestGroup.cc (RequestGroup::reportDownloadFinished)
2008-09-19 14:15:06 +00:00
Tatsuhiro Tsujikawa
67767e2f61 2008-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that a block in a piece is requested when same 
block is
	already requested to the same peer in end game mode.
	* src/BtRequestFactory.h
	* src/DefaultBtInteractive.cc
	* src/DefaultBtRequestFactory.cc
	* src/DefaultBtRequestFactory.h
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/PieceStorage.h
	* src/UnknownLengthPieceStorage.cc
	* src/UnknownLengthPieceStorage.h
	* test/DefaultBtRequestFactoryTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/MockBtRequestFactory.h
	* test/MockPieceStorage.h
2008-09-19 14:11:41 +00:00
Tatsuhiro Tsujikawa
cdaafd8c8c 2008-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed _uploadLength and _downloadLength from 
PeerSessionResource
	and use PeerStat::_sessionUploadLength and
	PeerStat::_sessionDownloadLength.
	* src/PeerSessionResource.cc
	* src/PeerSessionResource.h
2008-09-19 13:57:18 +00:00
Tatsuhiro Tsujikawa
c1ba5c9745 2008-09-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that prefixLength of split bucket which doesn't 
include
	local node ID is incremented.
	* src/DHTBucket.cc
	* src/DHTBucket.h
	* test/DHTBucketTest.cc
2008-09-18 13:21:33 +00:00
Tatsuhiro Tsujikawa
e7d462bb39 2008-09-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added cookies.sqlite to EXTRA_DIST
	* test/Makefile.am
2008-09-17 13:37:32 +00:00
Tatsuhiro Tsujikawa
39317e85be 2008-09-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added Turkish translation. Updated French, German, Russian and
	Simplified Chinese translations. Thanks to all translators.
	* po/LINGUAS
	* po/de.po
	* po/fr.po
	* po/ru.po
	* po/tr.po
	* po/zh_CN.po
2008-09-17 12:51:33 +00:00
Tatsuhiro Tsujikawa
5a3a16f0b0 2008-09-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added deliminating text to the beginning of the log so that one 
can find
	where the log starts easily.
	* src/main.cc
2008-09-17 10:22:28 +00:00
Tatsuhiro Tsujikawa
a1bac34778 2008-09-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Moved isProxyGETRequest function outside #ifdef ENABLE_ASYNC_DNS 
clause
	to fix compile error when async DNS is not enabled by 
configuration.
	* src/AbstractCommand.cc
2008-09-16 10:57:27 +00:00
Tatsuhiro Tsujikawa
c921529d68 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
If establishing conneciton to a server is failed, then mark 
error on
	its ServerStat.
	Added the cause of error to log when error event occurred.
	Moved message string to message.h for translation.
	* src/AbstractCommand.cc
	* src/AbstractCommand.h
	* src/FtpNegotiationCommand.cc
	* src/HttpRequestCommand.cc
	* src/PeerAbstractCommand.cc
	* src/message.h
2008-09-14 14:31:19 +00:00
Tatsuhiro Tsujikawa
8687877139 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the function to get error message from socket.
	* src/SocketCore.cc
	* src/SocketCore.h
2008-09-14 14:26:35 +00:00
Tatsuhiro Tsujikawa
72da43e47f 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added convenient method RequestGroupMan::getOrCreateServerStat()
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
2008-09-14 14:25:16 +00:00
Tatsuhiro Tsujikawa
0680ac5e5e 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
If error event is received in epoll, then abort download 
immediately.
	* src/AbstractCommand.cc
	* src/Command.cc
	* src/Command.h
	* src/DownloadEngine.cc
	* src/PeerAbstractCommand.cc
2008-09-14 13:43:34 +00:00
Tatsuhiro Tsujikawa
81b2e6e108 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added usage message for --uri-selector, --server-stat-of,
	--server-stat-in, --server-stat-timeout options.
	* src/HelpItemFactory.cc
	* src/usage_text.h
2008-09-14 13:40:25 +00:00
Tatsuhiro Tsujikawa
479a16edd6 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added upper limit of FTP response buffer. The current 
implementation
	uses 4096bytes as a limit.
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* test/FtpConnectionTest.cc
2008-09-14 12:51:30 +00:00
Tatsuhiro Tsujikawa
495f02ebbc 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use non-blocking socket for TCP communication to avoid possible
	blocking due to buffer full.
	* src/AbstractProxyRequestCommand.cc
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* src/FtpNegotiationCommand.cc
	* src/FtpNegotiationCommand.h
	* src/HttpConnection.cc
	* src/HttpConnection.h
	* src/HttpRequestCommand.cc
	* src/InitiatorMSEHandshakeCommand.cc
	* src/InitiatorMSEHandshakeCommand.h
	* src/MSEHandshake.cc
	* src/MSEHandshake.h
	* src/Makefile.am
	* src/PeerConnection.cc
	* src/PeerConnection.h
	* src/PeerInteractionCommand.cc
	* src/PeerListenCommand.cc
	* src/ReceiverMSEHandshakeCommand.cc
	* src/ReceiverMSEHandshakeCommand.h
	* src/SocketBuffer.cc
	* src/SocketBuffer.h
	* src/SocketCore.cc
	* src/SocketCore.h
2008-09-13 16:32:47 +00:00
Tatsuhiro Tsujikawa
281319e8cd 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Call setStatusRealtime() in constructor.
	* src/RealtimeCommand.cc
	* src/RealtimeCommand.h
2008-09-13 15:57:23 +00:00
Tatsuhiro Tsujikawa
369aff31c2 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Call Download::setNoWait(true) to execute newly created command 
without
	a pause.
	* src/AbstractCommand.cc
2008-09-13 15:54:52 +00:00
Tatsuhiro Tsujikawa
3599067ec1 2008-09-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --max-file-not-found=NUM option. If aria2 receives `file 
not
	found' error from HTTP/FTP server NUM times without getting 
single
	bytes of data, then force the download to fail.
	Basically aria2 tris all URIs available. So if long list of URIs 
are
	specified in Metalink, then aria2 will take a long time to fail
	eventually if all URIs are outdated. This option eases this 
situation
	to limit the number of servers to try.
	* src/FtpNegotiationCommand.cc
	* src/HelpItemFactory.cc
	* src/HttpResponseCommand.cc
	* src/OptionHandlerFactory.cc
	* src/PeerStat.h
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/SegmentMan.cc
	* src/SegmentMan.h
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
2008-09-10 14:56:44 +00:00
Tatsuhiro Tsujikawa
1b2a76706f 2008-09-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that bulkReceiveResponse() reads all received data 
as a
	response even if more than one response is in it.
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* test/FtpConnectionTest.cc
2008-09-09 15:22:32 +00:00
Tatsuhiro Tsujikawa
b23c3facc9 2008-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Merged from stable-0.15
	* m4/libcares.m4

	Use pkg-config
	* m4/sqlite3.m4
2008-09-09 12:49:11 +00:00
Tatsuhiro Tsujikawa
79597c32cc 2008-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed unnecessary if statement.
	* src/DefaultPieceStorage.cc (initPieceStorage)
2008-09-09 12:21:55 +00:00
Tatsuhiro Tsujikawa
4b997228ad 2008-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --connect-timeout option to specify connect timeout in 
seconds.
	This option is in effect for HTTP/FTP/proxy server. The timeout 
for
	connecting to BitTorrent peer is not controlled by this option.
	* src/AbstractProxyRequestCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/HelpItemFactory.cc
	* src/HttpRequestCommand.cc
	* src/OptionHandlerFactory.cc
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
2008-09-09 12:13:08 +00:00
Tatsuhiro Tsujikawa
a91664cef8 2008-09-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added help message for -R option.
	* src/HelpItemFactory.cc
	* src/usage_text.h
2008-09-08 13:23:55 +00:00
Tatsuhiro Tsujikawa
dc8915f599 2008-09-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the message that the time is in local time zone.
	* src/RequestGroup.cc
2008-09-08 13:09:38 +00:00
Tatsuhiro Tsujikawa
eb652b570e 2008-09-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented the ability to get timestamp from remote FTP server 
using
	MDTM command described in RFC3659.
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* src/FtpNegotiationCommand.cc
	* src/FtpNegotiationCommand.h
	* test/FtpConnectionTest.cc
	* test/Makefile.am
2008-09-08 13:06:44 +00:00
Tatsuhiro Tsujikawa
dbc8f5b737 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented the ability to get timestamp from remote HTTP server 
and
	apply it to local file. To enable this feature, --remote-time 
option
	is added. No usage text has been written yet.
	If several servers returns difference timestamp, then aria2 uses 
latest
	one.
	* src/CopyDiskAdaptor.cc
	* src/CopyDiskAdaptor.h
	* src/DirectDiskAdaptor.cc
	* src/DirectDiskAdaptor.h
	* src/DiskAdaptor.h
	* src/File.cc
	* src/File.h
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/HttpResponseCommand.h
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/RequestGroupMan.cc
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* test/CopyDiskAdaptorTest.cc
	* test/FileTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/MultiDiskAdaptorTest.cc
	* test/TestUtil.cc
2008-09-07 14:38:26 +00:00
Tatsuhiro Tsujikawa
4e28efd925 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that DiskWriterEntry is not created when its
	FileEntry.isRequested() is false and it doesn't share a piece 
with
	other FileEntries that are requested. This bug causes 
segmentation fault
	in the end.
2008-09-07 11:37:15 +00:00
Tatsuhiro Tsujikawa
390538d0b5 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that exception is thrown when 
MultiDiskAdaptor::size() is
	called if the number of file entries are greater than max open 
files.
	* src/AbstractSingleDiskAdaptor.cc
	* src/AbstractSingleDiskAdaptor.h
	* src/DiskAdaptor.h
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	* test/MultiDiskAdaptorTest.cc
2008-09-07 08:29:09 +00:00
Tatsuhiro Tsujikawa
5fb94a3af0 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added a constuctor that receives struct timeval.
	Added operator<.
	* src/TimeA2.cc
	* src/TimeA2.h
	* test/TimeTest.cc
2008-09-07 04:57:31 +00:00
Tatsuhiro Tsujikawa
b624a12ed0 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Parse `expires' of Set-Cookie using Time::parseHTTPDate()
	* src/CookieParser.cc
	* test/CookieParserTest.cc
	* test/HttpResponseTest.cc
2008-09-07 04:36:41 +00:00
Tatsuhiro Tsujikawa
69b18308d9 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implmented the functions to parse date.
	* src/TimeA2.cc
	* src/TimeA2.h
	* test/TimeTest.cc
2008-09-07 04:19:11 +00:00
Tatsuhiro Tsujikawa
9fc8b15736 2008-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added "Firefox3 Cookie" feature to FeatureConfig
	* src/FeatureConfig.cc
	* src/FeatureConfig.h
	* test/FeatureConfigTest.cc
2008-09-05 15:34:04 +00:00
Tatsuhiro Tsujikawa
40c1d08c5a 2008-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.16.0b
	* configure.ac
2008-09-05 13:18:39 +00:00
Tatsuhiro Tsujikawa
8164c069d9 2008-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use pkg-config if is is available.
	* m4/openssl.m4
2008-09-03 14:44:57 +00:00
Tatsuhiro Tsujikawa
2439cad4ac 2008-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
DEFAULT_ANNOUNCE_INTERVAL: unsigned int -> time_t
	* src/BtAnnounce.h
2008-09-03 12:14:20 +00:00
Tatsuhiro Tsujikawa
d3453a8387 2008-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
If an error occurred with a URI, remove identical URI from 
remaining
	URI list because it is likely that same error occurred in the 
end and it
	is waste of time.
	* src/AbstractCommand.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
2008-09-03 12:12:47 +00:00
Tatsuhiro Tsujikawa
09077b809f 2008-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed wrong comment.
	* src/DefaultPeerStorage.cc
2008-09-02 14:14:33 +00:00
Tatsuhiro Tsujikawa
7cbe5a7934 2008-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Moved implementation to SimpleRandomizer.cc from 
SimpleRandomizer.h.
	Added return value of getpid() to argument of srand() to achieve 
more
	randomized value.
	* src/SimpleRandomizer.cc
	* src/SimpleRandomizer.h
2008-09-02 14:11:59 +00:00
Tatsuhiro Tsujikawa
9f5ed15e6f Fixed typo. 2008-09-02 13:52:12 +00:00
Tatsuhiro Tsujikawa
574ca31e38 2008-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Contact tracker frequently when the number of connections are 0	
and
	download is not finished yet.
	* src/ActivePeerConnectionCommand.cc
	* src/BtAnnounce.h
	* src/DefaultBtAnnounce.cc
	* src/DefaultBtAnnounce.h
	* test/MockBtAnnounce.h
2008-09-02 13:51:46 +00:00
Tatsuhiro Tsujikawa
c46b6055c6 2008-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Moved threthold values to UTPexExtensionMessage.
	* src/DefaultBtInteractive.cc
	* src/Peer.cc
	* src/Peer.h
	* src/UTPexExtensionMessage.cc
	* src/UTPexExtensionMessage.h
	* test/UTPexExtensionMessageTest.cc
2008-09-02 12:31:04 +00:00
Tatsuhiro Tsujikawa
46f0e018d4 2008-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added _incoming member to Peer class and made it true if the 
peer
	initiated connection. Don't add those peer to UTPex message.
	If extended handshake is received, assign _incoming to false.
	* src/DefaultBtInteractive.cc
	* src/HandshakeExtensionMessage.cc
	* src/Peer.cc
	* src/Peer.h
	* src/PeerListenCommand.cc
2008-09-02 11:22:47 +00:00
Tatsuhiro Tsujikawa
d4215a82b7 2008-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made files whose name ends with ".gz", ".tgz" not inflated by 
Content
	Encoding Decoder. Removed size threshold for turning off on the 
fly
	inflation because resulting file may or may not be inflated 
depending
	on the file size and I think it is not expected by users.
	This change fixes segmentation fault when Metalink file contains 
gzipped
	file and its filesize is provided.
	* src/HttpResponseCommand.cc
	* src/HttpResponseCommand.h
2008-09-01 15:06:29 +00:00
Tatsuhiro Tsujikawa
6779c72b5d 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made Cookie immutable.
	* src/Cookie.cc
	* src/Cookie.h
	* src/CookieParser.cc
	* src/CookieParser.h
	* src/CookieStorage.cc
	* test/CookieParserTest.cc
	* test/CookieStorageTest.cc
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
2008-09-01 15:00:41 +00:00
Tatsuhiro Tsujikawa
2152b20ba4 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed CookieBox, CookieBoxFactory.
	* src/CookieBox.cc
	* src/CookieBox.h
	* src/CookieBoxFactory.cc
	* src/CookieBoxFactory.h
	* src/Makefile.am
2008-09-01 13:57:44 +00:00
Tatsuhiro Tsujikawa
e7633f2939 Added comment. 2008-09-01 13:55:59 +00:00