mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
Improve ssh_options_set_username().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@349 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
10
sample.c
10
sample.c
@@ -420,8 +420,14 @@ int main(int argc, char **argv){
|
||||
}
|
||||
opts(argc,argv);
|
||||
signal(SIGTERM, do_exit);
|
||||
if(user)
|
||||
ssh_options_set_username(options,user);
|
||||
|
||||
if (user) {
|
||||
if (ssh_options_set_username(options,user) < 0) {
|
||||
ssh_options_free(options);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ssh_options_set_host(options,host) < 0) {
|
||||
ssh_options_free(options);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user