Commit Graph

932 Commits

Author SHA1 Message Date
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
Tatsuhiro Tsujikawa
398d53f5f5 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use CookieStorage class instead of CookieBox class.
	Now CookieStorage accepts cookies from numeric host such as 
192.168.1.1.
	* src/AbstractProxyRequestCommand.cc
	* src/CookieStorage.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/HttpConnection.cc
	* src/HttpConnection.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/Makefile.am
	* src/MultiUrlRequestInfo.cc
	* src/Request.cc
	* src/Request.h
	* src/main.cc
	* test/AllTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
	* test/nscookietest.txt
2008-09-01 13:46:03 +00:00
Tatsuhiro Tsujikawa
f670cdbba9 2008-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated
	* test/Cookies.sqlite
	* test/nscookietest.txt
2008-08-27 16:33:09 +00:00
Tatsuhiro Tsujikawa
9ac91413dd 2008-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added tests for CookieStorage::load()
	* test/CookieStorageTest.cc
2008-08-27 16:31:43 +00:00
Tatsuhiro Tsujikawa
9cdcbf32ff 2008-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added CookieStorage class which is based on RFC2109 and manages 
cookies
	more strictly than CookieBox and CookieBoxFactory class.
	* src/CookieStorage.cc
	* src/CookieStorage.h
	* src/Cookie.cc
	* src/Cookie.h
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
2008-08-27 16:04:36 +00:00
Tatsuhiro Tsujikawa
58ad225655 2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that commands are created more than the number of	
pieces.
	* src/RequestGroup.cc
2008-08-27 15:02:21 +00:00
Tatsuhiro Tsujikawa
01ae2bc912 2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed infinite loop bug in FTP when SIZE command failed.
	* src/FtpNegotiationCommand.cc
2008-08-27 15:00:00 +00:00
Tatsuhiro Tsujikawa
a50048aa54 2008-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed DirectDiskAdaptorTest.h
	* test/Makefile.am
2008-08-26 12:53:43 +00:00
Tatsuhiro Tsujikawa
76a9ad9c84 2008-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed chunk checksum validation cannot detect trailing garbage 
data.
	BUG#2074141
	* src/AbstractSingleDiskAdaptor.cc
	* src/AbstractSingleDiskAdaptor.h
	* src/CheckIntegrityEntry.cc
	* src/CheckIntegrityEntry.h
	* src/DiskAdaptor.h
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	* src/RequestGroup.cc
	* test/DirectDiskAdaptorTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/TestUtil.cc
	* test/TestUtil.h
2008-08-26 12:39:07 +00:00
Tatsuhiro Tsujikawa
15101a89a0 2008-08-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number of dht.dat file to 3. In version 3 
format, time
	is stored in 64bit, network byte order.
	New build can load old format(version 2) but it saves the file 
in new
	format. It means once you used new build, your dht.dat becomes
	incompatible with older build.
	* src/DHTRoutingTableDeserializer.cc
	* src/DHTRoutingTableSerializer.cc
	* test/DHTRoutingTableSerializerTest.cc
2008-08-25 11:55:30 +00:00
Tatsuhiro Tsujikawa
d9668e2c23 2008-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added load-v0001.aria2 and load-nonBt-v0001.aria2 to EXTRA_DIST.
	* test/Makefile.am
2008-08-24 09:46:03 +00:00
Tatsuhiro Tsujikawa
335a0fb36f 2008-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number of .aria2 control file to 0001.
	New aria2 can still load version 0000 file but it saves the file 
in
	version 0001 format. It means that new aria2 can resume download
	started by old aria2 but the opposite is not true.
	* src/DefaultBtProgressInfoFile.cc
	* src/DefaultBtProgressInfoFile.h
	* test/DefaultBtProgressInfoFileTest.cc
2008-08-24 09:43:45 +00:00
Tatsuhiro Tsujikawa
02dde388b8 2008-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added ntoh64 and hton64 as inline functions.
	* src/Util.cc
	* test/UtilTest.cc
2008-08-24 07:55:34 +00:00
Tatsuhiro Tsujikawa
ed25d2e245 2008-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added sqlite3 depenency and Firefox3 cookie support.
	* README
2008-08-23 16:14:17 +00:00
Tatsuhiro Tsujikawa
bf072626c8 2008-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
State that firefox3 cookie is supported explicitly in the usage.
	* src/usage_text.h
2008-08-23 16:09:43 +00:00
Tatsuhiro Tsujikawa
33ad8505cd 2008-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Externalized message.
	* src/RequestGroupMan.cc
	* src/message.h
2008-08-23 15:59:15 +00:00
Tatsuhiro Tsujikawa
ef2478b246 2008-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Save temporary file first and rename to the destination on 
success.
	Added test cases.
	* src/RequestGroupMan.cc
	* test/RequestGroupManTest.cc
2008-08-23 15:42:06 +00:00
Tatsuhiro Tsujikawa
a12be22ecb 2008-08-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that the number of connected peer is exceeding the 
limit
	(55 by default) in seeding mode.
	Multiplied 0.8 to _maxUploadSpeedLimit.
	* src/ActivePeerConnectionCommand.cc
2008-08-23 15:17:32 +00:00
Tatsuhiro Tsujikawa
df9d042d25 2008-08-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Clear table item.
	* src/Dictionary.cc
2008-08-23 15:09:29 +00:00
Tatsuhiro Tsujikawa
8503419ae3 2008-08-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed error handling of lseek.
	* src/AbstractDiskWriter.cc
2008-08-23 14:59:04 +00:00
Tatsuhiro Tsujikawa
7e8565f82e 2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "(1.x/2.x)" from TEXT_LOAD_COOKIES since aria2 can load 
Firefox3
	style cookie file.
	* src/usage_text.h
2008-08-17 14:13:04 +00:00
Tatsuhiro Tsujikawa
4e806b1bb0 Fixed typo. 2008-08-17 14:09:27 +00:00
Tatsuhiro Tsujikawa
0e6c0498a3 2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
If a cookie whose expire date is later than 2038-01-19 03:14:07 
GMT is
	sent from server, its expire date is assumed to 2038-01-19 
03:14:07 GMT.
	If Util::httpGMT is failed, then Cookie::onetime is set to true.
	* src/Util.cc
	* src/Util.h
	* src/CookieParser.cc
	* test/UtilTest.cc
	* test/CookieParserTest.cc
2008-08-17 14:09:03 +00:00
Tatsuhiro Tsujikawa
adfcf57e32 2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Seprate the implementation to load old mozilla format of cookie 
to
	NsCookieParser class.
	* src/CookieBoxFactory.cc
	* src/CookieBoxFactory.h
	* src/NsCookieParser.cc
	* src/NsCookieParser.h
	* test/NsCookieParserTest.cc
2008-08-17 12:58:56 +00:00
Tatsuhiro Tsujikawa
aabb6bb2d9 2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made parse() const
	* src/Sqlite3MozCookieParser.cc
	* src/Sqlite3MozCookieParser.h
2008-08-17 12:56:23 +00:00
Tatsuhiro Tsujikawa
0cac0dabde 2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added firefox3 cookie support based on the patch submitted by
	tizianomueller.
	firefox3 cookie is SQLite3 database. libsqlite3 is required to 
enable
	this functionality.
	* configure.ac
	* m4/sqlite3.m4
	* src/CookieBoxFactory.cc
	* src/CookieBoxFactory.h
	* src/Makefile.am
	* src/Makefile.in
	* src/Sqlite3MozCookieParser.cc
	* src/Sqlite3MozCookieParser.h
	* src/main.cc
	* test/CookieBoxFactoryTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/Sqlite3MozCookieParserTest.cc
	* test/badcookies.sqlite
	* test/cookies.sqlite
2008-08-17 10:44:12 +00:00
Tatsuhiro Tsujikawa
72d21885d1 2008-08-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added Danish and Greek translations.
	Updated Spanish, Catalan, Norwegian Nynorsk translations.
	Great thanks to all translators.
	* po/LINGUAS
	* po/el.po
	* po/da.po
	* po/es.po
	* po/ca.po
	* po/nn.po
2008-08-15 15:06:24 +00:00
Tatsuhiro Tsujikawa
a49523ce99 2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed man page: --follow-bittorrent should be --follow-torrent
	* doc/aria2c.1.txt
2008-08-14 14:02:18 +00:00
Tatsuhiro Tsujikawa
2283c5ee14 2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed: numCommand is less than the value specified in -C option.
	* src/RequestGroup.cc
2008-08-13 16:15:31 +00:00
Tatsuhiro Tsujikawa
326d11bc46 2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed occasional assertion failure in PieceSegment.
	Calling PieceStorage::getMissingPiece(size_t) was missing after
	canceling segments in SegmentMan::getSegment(int32_t). This 
resulted in
	creation of duplicate segments and one of the segment was 
finished then
	assertion failure was caused.
	* src/SegmentMan.cc
	* test/SegmentManTest.cc
2008-08-13 16:13:54 +00:00
Tatsuhiro Tsujikawa
db46bab38b 2008-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added options to load/save the server's performance/status to a	
file
	and the timeout to drop their data.
	--server-stat-of=FILE specifies the file to which performance 
data
	is saved.
	--server-stat-if=FILE specifies the file to read previously 
saved
	by --server-stat-of option. Might be used with 
--uri-selector=feedback.
	--server-stat-timeout=TIMEOUT specifies timeout to invalidate 
the data.
	TIMEOUT is specified in seconds and the default value is 
24hours.
	* src/MultiUrlRequestInfo.cc
	* src/OptionHandlerFactory.cc
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
	* src/ServerStatMan.cc
	* src/ServerStatMan.h
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* test/ServerStatManTest.cc
2008-08-10 15:22:55 +00:00
Tatsuhiro Tsujikawa
6aba376430 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented ServerStatMan::removeStaleServerStat() and its test 
case.
	* src/ServerStatMan.cc
	* src/ServerStatMan.h
	* test/ServerStatManTest.cc
2008-08-09 13:30:40 +00:00
Tatsuhiro Tsujikawa
d85014b937 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented ServerStatMan::load(...) function and its test case.
	* src/ServerStat.cc
	* src/ServerStat.h
	* src/ServerStatMan.cc
	* test/ServerStatManTest.cc
	* test/ServerStatTest.cc
2008-08-09 11:29:27 +00:00
Tatsuhiro Tsujikawa
8208e538ba 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use time_t instead of int32_t. Use int64_t where milli second is
	expected.
	* src/TimeA2.cc
	* src/TimeA2.h
2008-08-09 10:31:29 +00:00
Tatsuhiro Tsujikawa
26690f692b 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented ServerStatMan::save(...) function and its test case.
	* src/ServerStat.cc
	* src/ServerStat.h
	* src/ServerStatMan.cc
	* src/ServerStatMan.h
	* test/ServerStatManTest.cc
2008-08-09 09:59:56 +00:00
Tatsuhiro Tsujikawa
70b457da01 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now aria2 uses name attribute in Metalink as local filename in
	BitTorrent downloads. BUG#2033999
	* src/BtContext.h
	* src/BtDependency.cc
	* src/DefaultBtContext.cc
	* src/DefaultBtContext.h
	* src/SingleFileDownloadContext.cc
	* src/SingleFileDownloadContext.h
	* test/BtDependencyTest.cc
	* test/DefaultBtContextTest.cc
	* test/MockBtContext.h
2008-08-08 16:44:59 +00:00
Tatsuhiro Tsujikawa
057516d1bc 2008-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added AC_C_BIGENDIAN
	* src/configure.ac
2008-08-07 15:33:29 +00:00
Tatsuhiro Tsujikawa
a699a46858 2008-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Limited numCommand less than or equal to the number of piece.
	* src/RequestGroup.cc
2008-08-07 15:24:13 +00:00