summaryrefslogtreecommitdiff
path: root/lib/easy.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-08-16 16:16:33 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-08-17 16:57:55 +0200
commitd6dea75af7c00e396cffa2e74350352703312180 (patch)
treebd1f2dd454929bf9aa6e62b3d286b631ed75f208 /lib/easy.c
parent5b2d703fe5900fcda846e41d67c62f62dd755839 (diff)
downloadcurl-d6dea75af7c00e396cffa2e74350352703312180.tar.gz
vssh: move ssh init/cleanup functions into backend code
Diffstat (limited to 'lib/easy.c')
-rw-r--r--lib/easy.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/easy.c b/lib/easy.c
index b8d94c740..1d49a0366 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -187,16 +187,8 @@ static CURLcode global_init(long flags, bool memoryfuncs)
(void)Curl_ipv6works();
-#if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_INIT)
- if(libssh2_init(0)) {
- DEBUGF(fprintf(stderr, "Error: libssh2_init failed\n"));
- return CURLE_FAILED_INIT;
- }
-#endif
-
-#if defined(USE_LIBSSH)
- if(ssh_init()) {
- DEBUGF(fprintf(stderr, "Error: libssh_init failed\n"));
+#if defined(USE_SSH)
+ if(Curl_ssh_init()) {
return CURLE_FAILED_INIT;
}
#endif
@@ -274,13 +266,7 @@ void curl_global_cleanup(void)
Curl_amiga_cleanup();
-#if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_EXIT)
- (void)libssh2_exit();
-#endif
-
-#if defined(USE_LIBSSH)
- (void)ssh_finalize();
-#endif
+ Curl_ssh_cleanup();
init_flags = 0;
}