mirror of
https://github.com/google/cdc-file-transfer.git
synced 2026-10-29 08:40:44 +03:00
[cdc_stream] Append errors from netstart to status (#9)
So far, errors from the remote netstat process would only be logged in the asset stream service, for instance when SSH auth failed. However, the errors were not shown to the client, and that's the most important thing. Also adds some feedback to cdc_stream in case of success.
This commit is contained in:
1 parent
269fb2be45
commit
bccc025945
6 files changed
+43
-30
No files matched your search
@@ -135,6 +135,10 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
status = client.StartSession(src_dir, user_host, ssh_port, mount_dir,
|
||||
ssh_command, scp_command);
|
||||
if (status.ok()) {
|
||||
LOG_INFO("Started streaming directory '%s' to '%s:%s'", src_dir,
|
||||
user_host, mount_dir);
|
||||
}
|
||||
} else /* if (command == "stop") */ {
|
||||
if (args.size() < 3) {
|
||||
LOG_ERROR(
|
||||
@@ -147,6 +151,9 @@ int main(int argc, char* argv[]) {
|
||||
if (!ParseUserHostDir(args[2], &user_host, &mount_dir)) return 1;
|
||||
|
||||
status = client.StopSession(user_host, mount_dir);
|
||||
if (status.ok()) {
|
||||
LOG_INFO("Stopped streaming session to '%s:%s'", user_host, mount_dir);
|
||||
}
|
||||
}
|
||||
|
||||
if (!status.ok()) {
|
||||
|
||||
Reference in new issue
Block a user