Преглед на файлове

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
Tatsuhiro Tsujikawa преди 17 години
родител
ревизия
de9605815d
променени са 5 файла, в които са добавени 18 реда и са изтрити 7 реда
  1. 9 0
      ChangeLog
  2. 1 0
      src/HelpItemFactory.cc
  3. 1 1
      src/OptionHandlerFactory.cc
  4. 1 1
      src/option_processing.cc
  5. 6 5
      src/usage_text.h

+ 9 - 0
ChangeLog

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

+ 1 - 0
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);

+ 1 - 1
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)));

+ 1 - 1
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");

+ 6 - 5
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"\