2008-10-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Added --dht-file-path option to change the path to dht.dat, 
which is a
	serialized DHT routing table.
	* src/OptionHandlerFactory.cc
	* src/option_processing.cc
	* src/usage_text.h
pull/1/head
Tatsuhiro Tsujikawa 2008-10-10 11:35:32 +00:00
parent 1311ac1a47
commit d12e69f0eb
4 changed files with 17 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2008-10-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --dht-file-path option to change the path to dht.dat, which is a
serialized DHT routing table.
* src/OptionHandlerFactory.cc
* src/option_processing.cc
* src/usage_text.h
2008-10-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed possible underflow.

View File

@ -728,10 +728,10 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers()
{
SharedHandle<OptionHandler> op(new DefaultOptionHandler
(PREF_DHT_FILE_PATH,
NO_DESCRIPTION,
TEXT_DHT_FILE_PATH,
Util::getHomeDir()+"/.aria2/dht.dat",
"/PATH/TO/DHT_DAT",
true));
"/PATH/TO/DHT_DAT"));
op->addTag(TAG_BITTORRENT);
handlers.push_back(op);
}
{

View File

@ -184,6 +184,7 @@ Option* option_processing(int argc, char* const argv[])
{ PREF_BT_REQUEST_PEER_SPEED_LIMIT.c_str(), required_argument, &lopt, 32 },
{ PREF_BT_MAX_OPEN_FILES.c_str(), required_argument, &lopt, 33 },
{ PREF_BT_SEED_UNVERIFIED.c_str(), optional_argument, &lopt, 34 },
{ PREF_DHT_FILE_PATH.c_str(), required_argument, &lopt, 35 },
#endif // ENABLE_BITTORRENT
#ifdef ENABLE_METALINK
{ PREF_METALINK_FILE.c_str(), required_argument, NULL, 'M' },
@ -300,6 +301,9 @@ Option* option_processing(int argc, char* const argv[])
cmdstream << PREF_BT_SEED_UNVERIFIED << "=" << toBoolArg(optarg)
<< "\n";
break;
case 35:
cmdstream << PREF_DHT_FILE_PATH << "=" << optarg << "\n";
break;
case 100:
cmdstream << PREF_METALINK_VERSION << "=" << optarg << "\n";
break;

View File

@ -242,6 +242,8 @@ _(" --dht-listen-port=PORT... Set UDP listening port for DHT.\n"\
#define TEXT_DHT_ENTRY_POINT \
_(" --dht-entry-point=HOST:PORT Set host and port as an entry point to DHT\n"\
" network.")
#define TEXT_DHT_FILE_PATH \
_(" --dht-file-path=PATH Change the DHT routing table file to PATH.")
#define TEXT_BT_MIN_CRYPTO_LEVEL \
_(" --bt-min-crypto-level=plain|arc4 Set minimum level of encryption method.\n"\
" If several encryption methods are provided by a\n"\