2008-11-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Made the default value of --ftp-pasv option set to true and it
	can take true/false values.
	* src/OptionHandlerFactory.cc
	* src/option_processing.cc
	* src/usage_text.h
	* doc/aria2c.1.txt
pull/1/head
Tatsuhiro Tsujikawa 2008-11-16 04:41:07 +00:00
parent 9b71a5d0b5
commit adb4ef2168
7 changed files with 30 additions and 13 deletions

View File

@ -1,3 +1,12 @@
2008-11-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made the default value of --ftp-pasv option set to true and it can take
true/false values.
* src/OptionHandlerFactory.cc
* src/option_processing.cc
* src/usage_text.h
* doc/aria2c.1.txt
2008-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2008-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Given custom random number generator to std::random_shuffle. Given custom random number generator to std::random_shuffle.

View File

@ -1,11 +1,11 @@
.\" Title: aria2c .\" Title: aria2c
.\" Author: .\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: 11/15/2008 .\" Date: 11/16/2008
.\" Manual: .\" Manual:
.\" Source: .\" Source:
.\" .\"
.TH "ARIA2C" "1" "11/15/2008" "" "" .TH "ARIA2C" "1" "11/16/2008" "" ""
.\" disable hyphenation .\" disable hyphenation
.nh .nh
.\" disable justification (adjust text to left margin only) .\" disable justification (adjust text to left margin only)
@ -341,9 +341,12 @@ Set FTP password\&. This affects all URLs\&. Default:
\fIARIA2USER@\fR \fIARIA2USER@\fR
.RE .RE
.PP .PP
\fB\-p\fR, \fB\-\-ftp\-pasv\fR \fB\-p\fR, \fB\-\-ftp\-pasv\fR[=\fItrue\fR|\fIfalse\fR]
.RS 4 .RS 4
Use passive mode in FTP\&. Use the passive mode in FTP\&. If
\fIfalse\fR
is given, the active mode will be used\&. Default:
\fItrue\fR
.RE .RE
.PP .PP
\fB\-\-ftp\-proxy\fR=PROXY \fB\-\-ftp\-proxy\fR=PROXY

View File

@ -827,11 +827,13 @@ aria2c -o myfile.zip http://mirror1/file.zip http://mirror2/file.zip</td>
</p> </p>
</dd> </dd>
<dt> <dt>
<strong>-p</strong>, <strong>--ftp-pasv</strong> <strong>-p</strong>, <strong>--ftp-pasv</strong>[=<em>true</em>|<em>false</em>]
</dt> </dt>
<dd> <dd>
<p> <p>
Use passive mode in FTP. Use the passive mode in FTP.
If <em>false</em> is given, the active mode will be used.
Default: <em>true</em>
</p> </p>
</dd> </dd>
<dt> <dt>
@ -2019,7 +2021,7 @@ files in the program, then also delete it here.</p></div>
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Last updated 2008-11-15 23:46:24 JST Last updated 2008-11-16 13:40:15 JST
</div> </div>
</div> </div>
</body> </body>

View File

@ -245,8 +245,10 @@ FTP Specific Options
Set FTP password. This affects all URLs. Set FTP password. This affects all URLs.
Default: 'ARIA2USER@' Default: 'ARIA2USER@'
*-p*, *--ftp-pasv*:: *-p*, *--ftp-pasv*[='true'|'false']::
Use passive mode in FTP. Use the passive mode in FTP.
If 'false' is given, the active mode will be used.
Default: 'true'
*--ftp-proxy*=PROXY:: *--ftp-proxy*=PROXY::
Use this proxy server for FTP. See also *--all-proxy* option. Use this proxy server for FTP. See also *--all-proxy* option.

View File

@ -555,7 +555,7 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers()
SharedHandle<OptionHandler> op(new BooleanOptionHandler SharedHandle<OptionHandler> op(new BooleanOptionHandler
(PREF_FTP_PASV, (PREF_FTP_PASV,
TEXT_FTP_PASV, TEXT_FTP_PASV,
V_FALSE)); // TODO ommit? V_TRUE));
op->addTag(TAG_FTP); op->addTag(TAG_FTP);
handlers.push_back(op); handlers.push_back(op);
} }

View File

@ -132,7 +132,7 @@ Option* option_processing(int argc, char* const argv[])
{ PREF_FTP_USER.c_str(), required_argument, &lopt, 9 }, { PREF_FTP_USER.c_str(), required_argument, &lopt, 9 },
{ PREF_FTP_PASSWD.c_str(), required_argument, &lopt, 10 }, { PREF_FTP_PASSWD.c_str(), required_argument, &lopt, 10 },
{ PREF_FTP_TYPE.c_str(), required_argument, &lopt, 11 }, { PREF_FTP_TYPE.c_str(), required_argument, &lopt, 11 },
{ PREF_FTP_PASV.c_str(), no_argument, NULL, 'p' }, { PREF_FTP_PASV.c_str(), optional_argument, 0, 'p' },
{ "ftp-via-http-proxy", required_argument, &lopt, 12 }, { "ftp-via-http-proxy", required_argument, &lopt, 12 },
{ "http-proxy-method", required_argument, &lopt, 14 }, { "http-proxy-method", required_argument, &lopt, 14 },
{ PREF_LOWEST_SPEED_LIMIT.c_str(), required_argument, &lopt, 200 }, { PREF_LOWEST_SPEED_LIMIT.c_str(), required_argument, &lopt, 200 },
@ -497,7 +497,7 @@ Option* option_processing(int argc, char* const argv[])
cmdstream << PREF_MAX_TRIES << "=" << optarg << "\n"; cmdstream << PREF_MAX_TRIES << "=" << optarg << "\n";
break; break;
case 'p': case 'p':
cmdstream << PREF_FTP_PASV << "=" << V_TRUE << "\n"; cmdstream << PREF_FTP_PASV << "=" << toBoolArg(optarg) << "\n";
break; break;
case 'S': case 'S':
cmdstream << PREF_SHOW_FILES << "=" << V_TRUE << "\n"; cmdstream << PREF_SHOW_FILES << "=" << V_TRUE << "\n";

View File

@ -95,7 +95,8 @@ _(" --ftp-passwd=PASSWD Set FTP password. This affects all URLs.")
#define TEXT_FTP_TYPE \ #define TEXT_FTP_TYPE \
_(" --ftp-type=TYPE Set FTP transfer type.") _(" --ftp-type=TYPE Set FTP transfer type.")
#define TEXT_FTP_PASV \ #define TEXT_FTP_PASV \
_(" -p, --ftp-pasv Use passive mode in FTP.") _(" -p, --ftp-pasv[=true|false] Use the passive mode in FTP. If false is given,\n"\
" the active mode will be used.")
#define TEXT_LOWEST_SPEED_LIMIT \ #define TEXT_LOWEST_SPEED_LIMIT \
_(" --lowest-speed-limit=SPEED Close connection if download speed is lower than\n"\ _(" --lowest-speed-limit=SPEED Close connection if download speed is lower than\n"\
" or equal to this value(bytes per sec).\n"\ " or equal to this value(bytes per sec).\n"\