1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00

Eat our own dog food, call libssh2_init and libssh2_exit in the examples.

This commit is contained in:
Simon Josefsson
2010-03-19 09:35:00 +01:00
parent fa4017c613
commit 7301036421
18 changed files with 169 additions and 4 deletions

View File

@ -73,6 +73,12 @@ int main(int argc, char *argv[])
sftppath = argv[4];
}
rc = libssh2_init (0);
if (rc != 0) {
fprintf (stderr, "libssh2 initialization failed (%d)\n", rc);
return 1;
}
/*
* The application code is responsible for creating the socket
* and establishing the connection
@ -165,6 +171,9 @@ int main(int argc, char *argv[])
#else
close(sock);
#endif
printf("all done\n");
printf("all done\n");
libssh2_exit();
return 0;
}