mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
Use new options interface in sample code.
This commit is contained in:
4
sample.c
4
sample.c
@@ -521,13 +521,13 @@ int main(int argc, char **argv){
|
|||||||
signal(SIGTERM, do_exit);
|
signal(SIGTERM, do_exit);
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
if (ssh_options_set_username(options,user) < 0) {
|
if (ssh_options_set(options, SSH_OPTIONS_USER, user) < 0) {
|
||||||
ssh_options_free(options);
|
ssh_options_free(options);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ssh_options_set_host(options,host) < 0) {
|
if (ssh_options_set(options, SSH_OPTIONS_HOST ,host) < 0) {
|
||||||
ssh_options_free(options);
|
ssh_options_free(options);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user