Commit Graph

343 Commits (3c41ea24bf2f4fc53c26f226db7c31a5e9b44fef)

Author SHA1 Message Date
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