mirror of
https://github.com/google/cdc-file-transfer.git
synced 2026-09-13 09:32:30 +03:00
[cdc_rsync] [cdc_stream] Remove SSH port argument (#41)
This CL removes the port arguments for both tools. The port argument can also be specified via the ssh-command and scp-command flags. In fact, if a port is specified by both port flags and ssh/scp commands, they interfere with each other. For ssh, the one specified in ssh-command wins. For scp, the one specified in scp-command wins. To fix this, one would have to parse scp-command and remove the port arg there. Or we could just remove the ssh-port arg. This is what this CL does. Note that if you need a custom port, it's very likely that you also have to define custom ssh and scp commands.
This commit is contained in:
@@ -99,9 +99,9 @@ CdcRsyncClient::CdcRsyncClient(const Options& options,
|
||||
std::string user_host, std::string destination)
|
||||
: options_(options),
|
||||
sources_(std::move(sources)),
|
||||
user_host_(std::move(user_host)),
|
||||
destination_(std::move(destination)),
|
||||
remote_util_(options.verbosity, options.quiet, &process_factory_,
|
||||
remote_util_(std::move(user_host), options.verbosity, options.quiet,
|
||||
&process_factory_,
|
||||
/*forward_output_to_log=*/false),
|
||||
port_manager_("cdc_rsync_ports_f77bcdfe-368c-4c45-9f01-230c5e7e2132",
|
||||
kForwardPortFirst, kForwardPortLast, &process_factory_,
|
||||
@@ -122,9 +122,6 @@ CdcRsyncClient::~CdcRsyncClient() {
|
||||
}
|
||||
|
||||
absl::Status CdcRsyncClient::Run() {
|
||||
// Initialize |remote_util_|.
|
||||
remote_util_.SetUserHostAndPort(user_host_, options_.port);
|
||||
|
||||
// Start the server process.
|
||||
absl::Status status = StartServer();
|
||||
if (HasTag(status, Tag::kDeployServer)) {
|
||||
|
||||
Reference in New Issue
Block a user