2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed the bug that DHT is always enabled when BitTorrent Magnet
	URI is supplied. Notify user that they should consider enabling
	DHT if they use Magnet URI.
	* src/RequestGroup.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-12-05 07:43:49 +00:00
parent 4100ba77c3
commit 7bc6fc54a1
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that DHT is always enabled when BitTorrent Magnet
URI is supplied. Notify user that they should consider enabling
DHT if they use Magnet URI.
* src/RequestGroup.cc
2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --disable-ipv6 option to disable IPv6.

View File

@ -277,9 +277,14 @@ void RequestGroup::createInitialCommand
SharedHandle<BtProgressInfoFile>
(progressInfoFile))));
if(metadataGetMode) {
std::deque<Command*> dhtCommands;
DHTSetup().setup(dhtCommands, e, _option.get());
e->addCommand(dhtCommands);
if(_option->getAsBool(PREF_ENABLE_DHT)) {
std::deque<Command*> dhtCommands;
DHTSetup().setup(dhtCommands, e, _option.get());
e->addCommand(dhtCommands);
} else {
_logger->notice("For BitTorrent Magnet URI, enabling DHT is strongly"
" recommended. See --enable-dht option.");
}
SharedHandle<CheckIntegrityEntry> entry
(new BtCheckIntegrityEntry(this));