diff options
author | Jean-Philippe Garcia Ballester <giga@le-pec.org> | 2006-07-09 10:36:44 +0000 |
---|---|---|
committer | Jean-Philippe Garcia Ballester <giga@le-pec.org> | 2006-07-09 10:36:44 +0000 |
commit | b2d0d13a2d6709c740453ee3ff32bc37160cc331 (patch) | |
tree | 8749b08068a402d2d92469be576572b2c159c918 /samplesshd.c | |
parent | 9bb0be2dbb995097859f304111e61c6bbc910746 (diff) | |
download | libssh-b2d0d13a2d6709c740453ee3ff32bc37160cc331.tar.gz libssh-b2d0d13a2d6709c740453ee3ff32bc37160cc331.tar.xz libssh-b2d0d13a2d6709c740453ee3ff32bc37160cc331.zip |
Add ssh_finalize to handle finalization of libssh and underlying cryptographic
library.
Add corresponding paragraph in API draft.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@75 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'samplesshd.c')
-rw-r--r-- | samplesshd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/samplesshd.c b/samplesshd.c index d51ac318..fe45562b 100644 --- a/samplesshd.c +++ b/samplesshd.c @@ -94,6 +94,7 @@ int main(int argc, char **argv){ } while (!auth); if(!auth){ printf("error : %s\n",ssh_get_error(session)); + ssh_finalize(); return 1; } do { @@ -113,6 +114,7 @@ int main(int argc, char **argv){ } while(message && !chan); if(!chan){ printf("error : %s\n",ssh_get_error(session)); + ssh_finalize(); return 1; } do { @@ -142,6 +144,7 @@ int main(int argc, char **argv){ write(1,buffer_get(buf),buffer_get_len(buf)); } while (i>0); ssh_disconnect(session); + ssh_finalize(); return 0; } |