diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-04-02 10:13:12 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-04-02 10:13:12 +0000 |
commit | 6026de46486913c40a9469267c429b2dfa57d806 (patch) | |
tree | 6fede1e55d6cef6544f263aad812b38afa87f320 /sample.c | |
parent | a9ef024f1045f696e424c77d7bbde8ce324916ac (diff) | |
download | libssh-6026de46486913c40a9469267c429b2dfa57d806.tar.gz libssh-6026de46486913c40a9469267c429b2dfa57d806.tar.xz libssh-6026de46486913c40a9469267c429b2dfa57d806.zip |
Improve ssh_options_set_host().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@347 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'sample.c')
-rw-r--r-- | sample.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -422,7 +422,10 @@ int main(int argc, char **argv){ signal(SIGTERM, do_exit); if(user) ssh_options_set_username(options,user); - ssh_options_set_host(options,host); + if (ssh_options_set_host(options,host) < 0) { + ssh_options_free(options); + return 1; + } session=ssh_new(); ssh_set_options(session,options); if(ssh_connect(session)){ |