Commit Graph

802 Commits (459f2f16a6b91339f84a5f3d3732d3b60b50d222)

Author SHA1 Message Date
Tatsuhiro Tsujikawa ad045fea44 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed duplicate HAVE_GETTIMEOFDAY
	* src/Makefile.am
	* src/Makefile.in
2008-06-06 14:01:33 +00:00
Tatsuhiro Tsujikawa faed68cc06 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use interval as a minInterval when minInterval is not supplied.
	* src/DefaultBtAnnounce.cc
2008-06-05 15:47:23 +00:00
Tatsuhiro Tsujikawa 74d35644fb 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker 
request
	attempt is failed, then 2nd attempt get kicked out more quickly.
	And it is now static const member of DefaultBtAnnounce.
	* src/DefaultBtAnnounce.h
2008-06-05 13:21:35 +00:00
Tatsuhiro Tsujikawa d773613e93 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Renamed BtRuntime::lessThanMinPeers() and 
BtRuntime::lessThanEqMinPeers.
	Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
	* src/ActivePeerConnectionCommand.cc
	* src/BtConstants.h
	* src/BtRuntime.h
	* src/DHTGetPeersCommand.cc
	* src/DefaultBtAnnounce.cc
	* src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
	BtRuntime::MAX_PEERS.
	* src/DefaultPeerStorage.h
	* src/InitiatorMSEHandshakeCommand.cc
	* src/PeerInitiateConnectionCommand.cc
	* src/PeerInteractionCommand.cc
	* src/PeerReceiveHandshakeCommand.cc
	* src/TrackerWatcherCommand.cc
2008-06-05 13:17:46 +00:00
Tatsuhiro Tsujikawa 4a454e94b7 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Always Connect to _numNewConnection 
	* src/ActivePeerConnectionCommand.cc
2008-06-05 13:02:49 +00:00
Tatsuhiro Tsujikawa ba158dbfc1 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made `begin' unsigned int.
	* src/GrowSegment.h
	* src/Piece.cc
	* src/Piece.h
	* src/PiecedSegment.cc
	* src/PiecedSegment.h
	* src/Segment.h
2008-06-05 12:53:30 +00:00
Tatsuhiro Tsujikawa 7d63daed22 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Calculate piece hash when data is arrived if the data is arrived 
in
	order. This removes additional read operation for hash 
calculation.
	If the data is arrived in out of order, the hash is calucated 
when the
	piece is completed. This is the same behavior as the old 
implementation.
	* src/BtPieceMessage.cc
	* src/DefaultBtProgressInfoFile.cc
	* src/DefaultPieceStorage.cc
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/DownloadEngine.cc
	* src/GrowSegment.cc
	* src/GrowSegment.h
	* src/Piece.cc
	* src/Piece.h
	* src/PiecedSegment.cc
	* src/PiecedSegment.h
	* src/Segment.h
	* test/PieceTest.cc
2008-06-04 16:28:16 +00:00
Tatsuhiro Tsujikawa 20f5fcfc0f 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Try to keep the ordering of outgoing piece message.
	* src/DefaultBtMessageDispatcher.cc
	(DefaultBtMessageDispatcher::sendMessages)
2008-06-04 15:53:47 +00:00
Tatsuhiro Tsujikawa bc5319081b 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed busy loop when error/hup epoll events occur.
	* src/AbstractCommand.cc
	* src/PeerAbstractCommand.cc
2008-06-04 15:27:58 +00:00
Tatsuhiro Tsujikawa fc0725002d 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --bt-request-peer-speed-limit option, which was a constant
	SLOW_SPEED_THRESHOLD.
	* src/ActivePeerConnectionCommand.cc
	* src/ActivePeerConnectionCommand.h
	* src/BtConstants.h
	* src/HelpItemFactory.cc
	* src/OptionHandlerFactory.cc
	* src/PeerReceiveHandshakeCommand.cc
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
2008-06-04 10:14:48 +00:00
Tatsuhiro Tsujikawa 0c22b9faf0 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed repeated call of getTopDirPath(). Instead, call it once 
and
	cache the result.
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	(mkdir, openFile, initAndOpenFile, openExistingFile)
2008-06-03 14:30:52 +00:00
Tatsuhiro Tsujikawa 1f084fc5dc 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error on debian etch.
	The libc6 shipped with debian etch doesn't define ULLONG_MAX 
properly
	even if _GNU_SOURCE is defined. So define ULLONG_MAX in case 
when
	it is undefined.
	* src/Util.cc (ULLONG_MAX)
2008-06-01 08:23:32 +00:00
Tatsuhiro Tsujikawa 54ee6c4627 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added epoll support. Use epoll if it is available. If not, use 
select.
	When async dns is enabled in compile time, epoll support is 
enabled
	only when aria2 is built with c-ares. This condition statement 
is
	defined in a2io.h.
	Currently aria2 supports both c-ares and ares, but ares is 
maintained
	for quite a while and debian already has c-ares package, ares 
support
	will be dropped in the future version.
	* configure.ac
	* src/AbstractCommand.cc
	* src/AsyncNameResolver.cc
	* src/AsyncNameResolver.h
	* src/Command.cc
	* src/Command.h
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/PeerAbstractCommand.cc
	* src/SocketCore.cc
	* src/SocketCore.h
	* src/a2io.h
2008-05-31 10:31:07 +00:00
Tatsuhiro Tsujikawa 242267028d 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* test/MetalinkEntryTest.cc: Added missing `defined' keyword to 
#if
	directive.
2008-05-31 10:27:21 +00:00
Tatsuhiro Tsujikawa 31a01bd0a6 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Do not do write operation to /dev/null file.
	* src/LogFactory.cc
	* src/SimpleLogger.cc

	Replaced vasprintf with vsnprintf
	* src/SimpleLogger.cc (SimpleLogger::writeLog)
2008-05-31 05:56:12 +00:00
Tatsuhiro Tsujikawa 405c46277f 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/BtRequestMessage.cc
	(BtRequestMessage::onQueue): Given piece to RequestSlot. This is 
a fix
	for segmentation fault caused by previous commit.
2008-05-31 05:49:28 +00:00
Tatsuhiro Tsujikawa 1d7b5e6f4a 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Reduced the usage of gettimeofday().
	* src/DefaultBtMessageDispatcher.cc
	
(DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
	(class FindStaleRequestSlot, class ProcessStaleRequestSlot)
	* src/RequestSlot.cc
	* src/RequestSlot.h
	(RequestSlot::isTimeout)
	
	Made RequestSlot have a reference to Piece object to avoid find
	Piece repeatedly.
	* src/DefaultBtMessageDispatcher.cc
	(class FindStaleRequestSlot, class ProcessStaleRequestSlot)
	* src/RequestSlot.cc
	* src/RequestSlot.h
	(RequestSlot::getPiece)
	* test/DefaultBtMessageDispatcherTest.cc
2008-05-31 05:46:16 +00:00
Tatsuhiro Tsujikawa f771b42e53 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/TimeA2.cc
	* src/TimeA2.h
	(Time::difference): New function.
	(Time::elapsed): Done optimization.
2008-05-31 05:36:59 +00:00
Tatsuhiro Tsujikawa 78dbc71960 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/HelpItemFactory.cc: Added missing `defined' keyword to #if
	directive.
2008-05-31 05:32:49 +00:00
Tatsuhiro Tsujikawa 82b2e5d069 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/option_processing.cc: Added missing `defined' keyword to 
#if
	directive.
2008-05-31 05:32:09 +00:00
Tatsuhiro Tsujikawa 4a0c657d8b 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2+1
	* src/configure.ac
2008-05-27 15:34:45 +00:00
Tatsuhiro Tsujikawa 20cb017357 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Refactored broken outstanding piece handling.
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/Piece.cc
	* src/Piece.h
2008-05-27 15:07:39 +00:00
Tatsuhiro Tsujikawa 27102091ad 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error on Mac OS X 10.3.9. This error was caused by 
the
	name collision of static variable and predefined macro.
	* src/BtContext.cc
	* src/BtContext.h
	* src/CookieBoxFactory.cc
	* src/CookieBoxFactory.h
	* src/CookieParser.cc
	* src/CookieParser.h
	* src/DefaultBtContext.cc
2008-05-27 14:55:20 +00:00
Tatsuhiro Tsujikawa e40ae31748 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/RequestGroup.cc
	(RequestGroup::createInitialCommand): Use empty() instead of 
size().
2008-05-27 14:44:55 +00:00
Tatsuhiro Tsujikawa 5699567aea 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Release 0.13.2
2008-05-25 01:46:30 +00:00
Tatsuhiro Tsujikawa 8f90b6092c 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make 
update-po
	* po/fr.po
	* po/ja.po
	* po/aria2c.pot
	* po/*.po
	* po/*.gmo
2008-05-25 01:43:22 +00:00
Tatsuhiro Tsujikawa 19ec823a7a 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2
	* src/configure.ac
2008-05-25 01:19:00 +00:00
Tatsuhiro Tsujikawa eacb3fa04f 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Refactord.
	* src/RequestGroupMan.cc
	(removeStoppedGroup)
	(fillRequestGroupFromReserver)
2008-05-24 12:00:51 +00:00
Tatsuhiro Tsujikawa 5d8c2c0890 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error on Ubuntu.
	* src/BtPieceMessage.cc
	* src/MessageDigestHelper.cc
	* src/Util.cc
2008-05-24 11:56:24 +00:00
Tatsuhiro Tsujikawa 8a653fe38b 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error when configured with --disable-bittorrent
	* test/DownloadHandlerFactoryTest.cc
2008-05-21 08:43:46 +00:00
Tatsuhiro Tsujikawa bd19e00919 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Done make update-po
	* po/aria2c.pot
	* po/*.po
	* po/*.gmo
2008-05-21 07:59:14 +00:00
Tatsuhiro Tsujikawa 9cf401f45d 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2rc.
	* src/configure.ac
2008-05-21 07:57:27 +00:00
Tatsuhiro Tsujikawa 9ca3763190 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made option name bold. Updated SYNOPSIS to make it more 
readable.
	* doc/aria2c.1.txt
	* doc/aria2c.1
	* doc/aria2c.1.html
	* src/version_usage.cc
2008-05-21 07:47:32 +00:00
Tatsuhiro Tsujikawa 65c7d8f26c 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Refactored. Use std::string instead of size and char*.
	* Data.cc
	* Data.h
	* test/Data.cc
2008-05-21 07:18:31 +00:00
Tatsuhiro Tsujikawa ad6ffd7f33 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added trimSelf(). Rewritten trim() to use trimSelf().
	* Util.cc
	* Util.h
2008-05-21 07:16:54 +00:00
Tatsuhiro Tsujikawa 90846bdafe 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/ChunkChecksum.h (getChecksum): Return const reference.
2008-05-20 15:22:53 +00:00
Tatsuhiro Tsujikawa 4749763419 Moved DownloadHandlerFactoryTest.cc to SRC in Makefile.am. 2008-05-20 15:18:25 +00:00
Tatsuhiro Tsujikawa bf58b49d87 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error when configured with --disable-metalink.
	Also moved test/DownloadHandlerFactoryTest.cc to SRC in 
Makefile.am.
	* test/FeatureConfigTest.cc
	* test/DownloadHandlerFactoryTest.cc
2008-05-20 14:27:58 +00:00
Tatsuhiro Tsujikawa a70a747c23 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error when configured with --without-gnutls
	--without-openssl
	* src/main.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/SegmentManTest.cc
2008-05-20 00:42:34 +00:00
Tatsuhiro Tsujikawa bbd2a995db 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error with OpenSSL.
	* src/IteratableChunkChecksumValidator.cc
	* src/LibsslDHKeyExchange.h
	* src/MessageDigestHelper.cc
2008-05-19 15:08:18 +00:00
Tatsuhiro Tsujikawa 13be071b6a 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Revert the default value of --max-concurrent-downloads to 5.
	Revert the default value of --metalink-servers to 5.
	Man pages was also updated.
	* src/option_processing.cc
	* doc/aria2c.1.txt
	* doc/aria2c.1.html
	* doc/aria2c.1
2008-05-19 12:36:20 +00:00
Tatsuhiro Tsujikawa ff6b5ecc9c 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Returns const reference:
	DownloadContext::getPieceHash, DownloadContext::getName,
	DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
	BtContext::getInfoHashAsString,
	* src/BtContext.h
	* src/DefaultBtContext.cc
	* src/DefaultBtContext.h
	* src/DownloadContext.h
	* src/SingleFileDownloadContext.h
	* test/MockBtContext.h
2008-05-19 11:28:17 +00:00
Tatsuhiro Tsujikawa 960d4acbce 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/RequestGroup.h (getDir): Removed.
2008-05-19 11:20:51 +00:00
Tatsuhiro Tsujikawa f4ac2c2185 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Returns const reference. The internal urlencode function was 
optimized
	a little bit.
	* src/Request.cc
	* src/Request.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
2008-05-19 11:19:18 +00:00
Tatsuhiro Tsujikawa 0189bbc6bc 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Defined option name and possible values as std::string to reduce
	temporary string object creation in runtime.
	* src/HelpItemFactory.cc
	* src/LogFactory.cc
	* src/Option.cc
	* src/OptionHandlerFactory.cc
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
2008-05-19 10:25:38 +00:00
Tatsuhiro Tsujikawa e59f4f2fe3 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Return const reference.
	* src/DownloadHandlerConstants.cc
	* src/DownloadHandlerConstants.h
	(getMetalinkExtensions)
	(getMetalinkContentTypes)
	(getBtExtensions)
	(getBtContentTypes)
2008-05-18 11:53:22 +00:00
Tatsuhiro Tsujikawa 7235f2657f 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/HttpHeader.cc (get): Rewritten.
2008-05-18 10:40:23 +00:00
Tatsuhiro Tsujikawa e1c1c010b8 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Make HttpHeader::getFirst(...) return const reference.
	* src/HttpHeader.cc
	* src/HttpHeader.h
2008-05-18 10:33:06 +00:00
Tatsuhiro Tsujikawa a0f8685de3 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use Option::getAsBool(...) instead of Option::get(...) and 
compare
	it with V_TRUE.
	* src/DefaultPieceStorage.cc
	* src/DownloadCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/HttpRequest.cc
	* src/InitiateConnectionCommand.cc
	* src/RequestGroup.cc
2008-05-18 10:25:41 +00:00
Tatsuhiro Tsujikawa 0a95211100 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made Option::get(...) return const reference of std::string.
	* src/Option.cc
	* src/Option.h
2008-05-18 10:14:53 +00:00