Commit b645cd77 authored by Aleksandr Konstantinov's avatar Aleksandr Konstantinov
Browse files

Passing force_secure and force_passive to delegatd GridFTP DMC.

parent e7784520
Pipeline #1452 failed with stage
in 51 minutes and 53 seconds
......@@ -36,6 +36,10 @@ namespace ArcDMCGridFTP {
}
DataStatus DataPointGridFTPDelegate::StartCommand(Arc::CountedPointer<Arc::Run>& run, std::list<std::string>& argv, DataStatus::DataStatusType errCode) {
argv.push_front(Arc::tostring(force_passive));
argv.push_front("-p");
argv.push_front(Arc::tostring(force_secure));
argv.push_front("-s");
argv.push_front(Arc::level_to_string(logger.getThreshold()));
argv.push_front("-V");
LogFormat format = LogDestination::getDefaultFormat();
......
......@@ -842,8 +842,8 @@ namespace ArcDMCGridFTP {
instream(instream),
outstream(outstream),
cbarg(new CBArg(this)),
force_secure(true), //??
force_passive(true), //??
force_secure(true),
force_passive(true),
ftp_threads(1),
range_start(0),
range_end(0),
......@@ -1127,6 +1127,8 @@ int main(int argc, char* argv[]) {
int range_end = 0;
std::string logger_verbosity;
int logger_format = -1;
int secure = 1;
int passive = 1;
try {
/* Create options parser */
......@@ -1138,6 +1140,8 @@ int main(int argc, char* argv[]) {
options.AddOption('E', "rangeend", "range end", "end", range_end);
options.AddOption('V', "verbosity", "logger verbosity level", "level", logger_verbosity);
options.AddOption('F', "format", "logger output format", "format", logger_format);
options.AddOption('s', "secure", "force secure data connection", "boolean", secure);
options.AddOption('p', "passive", "force passive data connection", "boolean", passive);
params = options.Parse(argc, argv);
if (params.empty()) {
......@@ -1182,6 +1186,8 @@ int main(int argc, char* argv[]) {
handler->SetBufferSize(bufsize);
// handler->SetStreams(streams); - use URL instead
handler->SetRange(range_start, range_end);
handler->SetSecure(secure);
handler->SetPassive(passive);
Arc::DataStatus result(Arc::DataStatus::Success);
if(command == "rename") {
if(params.empty()) {
......
......@@ -119,6 +119,8 @@ namespace ArcDMCGridFTP {
void SetStreams(int streams) { ftp_threads = streams; };
void SetRange(unsigned long long int start, unsigned long long int end) { range_start = start; range_end = end; };
void SetAllowOutOfOrder(bool out_of_order) { allow_out_of_order = out_of_order; };
void SetSecure(bool secure) { force_secure = secure; };
void SetPassive(bool passive) { force_passive = passive; };
DataStatus Read();
DataStatus Write();
DataStatus Check();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment