diff --git a/ChangeLog b/ChangeLog index bd3210f8..cbd8ed7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-12-05 Tatsuhiro Tsujikawa + + 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 Added --disable-ipv6 option to disable IPv6. diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index 23eb8f0c..8ad06cef 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -277,9 +277,14 @@ void RequestGroup::createInitialCommand SharedHandle (progressInfoFile)))); if(metadataGetMode) { - std::deque dhtCommands; - DHTSetup().setup(dhtCommands, e, _option.get()); - e->addCommand(dhtCommands); + if(_option->getAsBool(PREF_ENABLE_DHT)) { + std::deque 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 entry (new BtCheckIntegrityEntry(this));