From de9605815d1157cada1244fe5d93e90c7513cf67 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 9 Jun 2008 13:10:24 +0000 Subject: [PATCH] 2008-06-09 Tatsuhiro Tsujikawa Changed default value of -s option from 1 to 5. Also max value of -s option is changed from 5 to 16. * src/HelpItemFactory.cc * src/OptionHandlerFactory.cc * src/option_processing.cc * src/usage_text.h --- ChangeLog | 9 +++++++++ src/HelpItemFactory.cc | 1 + src/OptionHandlerFactory.cc | 2 +- src/option_processing.cc | 2 +- src/usage_text.h | 11 ++++++----- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index fbe10451..bb9824bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-06-09 Tatsuhiro Tsujikawa + + Changed default value of -s option from 1 to 5. + Also max value of -s option is changed from 5 to 16. + * src/HelpItemFactory.cc + * src/OptionHandlerFactory.cc + * src/option_processing.cc + * src/usage_text.h + 2008-06-09 Tatsuhiro Tsujikawa Changed -s options behavior. Now it means the number of connections diff --git a/src/HelpItemFactory.cc b/src/HelpItemFactory.cc index 96744ed2..8e1a3b69 100644 --- a/src/HelpItemFactory.cc +++ b/src/HelpItemFactory.cc @@ -70,6 +70,7 @@ TagContainerHandle HelpItemFactory::createHelpItems(const Option* op) #endif // HAVE_DAEMON { HelpItemHandle item(new HelpItem(PREF_SPLIT, TEXT_SPLIT)); + item->setAvailableValues("1-16"); item->addTag(TAG_BASIC); item->addTag(TAG_HTTP); item->addTag(TAG_FTP); diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index f09e37cf..78a9acc0 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -86,7 +86,7 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers() handlers.push_back(SH(new DefaultOptionHandler(PREF_DIR))); handlers.push_back(SH(new DefaultOptionHandler(PREF_OUT))); handlers.push_back(SH(new LogOptionHandler(PREF_LOG))); - handlers.push_back(SH(new NumberOptionHandler(PREF_SPLIT, 1, 5))); + handlers.push_back(SH(new NumberOptionHandler(PREF_SPLIT, 1, 16))); handlers.push_back(SH(new NumberOptionHandler(PREF_TIMEOUT, 1, 600))); handlers.push_back(SH(new NumberOptionHandler(PREF_MAX_TRIES, 0))); handlers.push_back(SH(new BooleanOptionHandler(PREF_FTP_PASV))); diff --git a/src/option_processing.cc b/src/option_processing.cc index 50272eb8..3dcd034e 100644 --- a/src/option_processing.cc +++ b/src/option_processing.cc @@ -76,7 +76,7 @@ Option* createDefaultOption() Option* op = new Option(); op->put(PREF_STDOUT_LOG, V_FALSE); op->put(PREF_DIR, "."); - op->put(PREF_SPLIT, "1"); + op->put(PREF_SPLIT, "5"); op->put(PREF_DAEMON, V_FALSE); op->put(PREF_SEGMENT_SIZE, Util::itos((int32_t)(1024*1024))); op->put(PREF_LISTEN_PORT, "6881-6999"); diff --git a/src/usage_text.h b/src/usage_text.h index c24416f1..e99af9b5 100644 --- a/src/usage_text.h +++ b/src/usage_text.h @@ -43,11 +43,12 @@ _(" -l, --log=LOG The file name of the log file. If '-' is\n"\ #define TEXT_DAEMON \ _(" -D, --daemon Run as daemon.") #define TEXT_SPLIT \ -_(" -s, --split=N Download a file using N connections. N must be\n"\ - " between 1 and 5. This option affects all URLs.\n"\ - " Thus, aria2 connects to each URL with\n"\ - " N connections.\n"\ - " Default: 1") +_(" -s, --split=N Download a file using N connections. If more\n"\ + " than N URLs are given, first N URLs are used and\n"\ + " remaining URLs are used for backup. If less than\n"\ + " N URLs are given, some of the URLs are used more\n"\ + " than once so that totaly N connections are made\n"\ + " simultaneously.") #define TEXT_RETRY_WAIT \ _(" --retry-wait=SEC Set the seconds to wait to retry after an error\n"\ " has occured. Specify a value between 0 and 60.\n"\