mirror of
https://github.com/upa/mscp.git
synced 2026-05-12 21:07:29 +08:00
connect SSH before starting copy threads in resume transfer
The first ssh connection attempt intends to get ssh password/passphrase for following ssh connections spawned by copy threads (Issue #17 and #18).
This commit is contained in:
12
src/main.c
12
src/main.c
@@ -487,6 +487,18 @@ int main(int argc, char **argv)
|
|||||||
pr_err("mscp_checkpoint_load: %s", priv_get_err());
|
pr_err("mscp_checkpoint_load: %s", priv_get_err());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dryrun)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
/* create the first ssh connection to get password or
|
||||||
|
* passphrase. The sftp session over it will be not
|
||||||
|
* used for resume transfer in actuality. ToDo:
|
||||||
|
* connectin managemnet should be improved. */
|
||||||
|
if (mscp_connect(m) < 0) {
|
||||||
|
pr_err("mscp_connect: %s", priv_get_err());
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dryrun) {
|
if (dryrun) {
|
||||||
|
|||||||
Reference in New Issue
Block a user