aboutsummaryrefslogtreecommitdiff
path: root/samplesshd.c
diff options
context:
space:
mode:
authorJean-Philippe Garcia Ballester <giga@le-pec.org>2006-07-09 10:36:44 +0000
committerJean-Philippe Garcia Ballester <giga@le-pec.org>2006-07-09 10:36:44 +0000
commitb2d0d13a2d6709c740453ee3ff32bc37160cc331 (patch)
tree8749b08068a402d2d92469be576572b2c159c918 /samplesshd.c
parent9bb0be2dbb995097859f304111e61c6bbc910746 (diff)
downloadlibssh-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.c3
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;
}