2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

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
pull/1/head
Tatsuhiro Tsujikawa 2008-06-09 13:10:24 +00:00
parent 32edb40d7d
commit de9605815d
5 changed files with 18 additions and 7 deletions

View File

@ -1,3 +1,12 @@
2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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 <tujikawa at rednoah dot com>
Changed -s options behavior. Now it means the number of connections

View File

@ -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);

View File

@ -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)));

View File

@ -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");

View File

@ -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"\