cfg.port = 22;
}
- if (portnumber)
- cfg.port = portnumber;
-
/* Set username */
if (user != NULL && user[0] != '\0') {
strncpy(cfg.username, user, sizeof(cfg.username)-1);
cfg.username[sizeof(cfg.username)-1] = '\0';
- cfg.port = 22;
} else if (cfg.username[0] == '\0') {
bump("Empty user name");
}
if (cfg.protocol != PROT_SSH)
cfg.port = 22;
+ if (portnumber)
+ cfg.port = portnumber;
+
err = ssh_init(cfg.host, cfg.port, cmd, &realhost);
if (err != NULL)
bump("ssh_init: %s", err);
f = CreateFile(src, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, 0, 0);
if (f == INVALID_HANDLE_VALUE) {
- run_err("%s: Cannot open file");
+ run_err("%s: Cannot open file", src);
return;
}