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
Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
virtual.
* src/DHTMessageDispatcher.h
* src/DHTMessageDispatcherImpl.{h, cc}
* src/DHTSetup.cc
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.
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
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
Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
ActivePeerConnectionCommand when it is given and
PREF_MAX_DOWNLOAD_LIMIT < default threshold.
* src/ActivePeerConnectionCommand.{h, cc}
* src/BtSetup.cc
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}
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)
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.
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}
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
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
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
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}
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-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
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
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
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)
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
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}
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
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
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)
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
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