1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

wolfssh: make it init properly via Curl_ssh_init()

Closes #4846
This commit is contained in:
Daniel Stenberg 2020-01-23 20:05:22 +01:00
parent 1c532870ed
commit 920af1a664
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 7 deletions

View File

@ -193,13 +193,6 @@ static CURLcode global_init(long flags, bool memoryfuncs)
} }
#endif #endif
#ifdef USE_WOLFSSH
if(WS_SUCCESS != wolfSSH_Init()) {
DEBUGF(fprintf(stderr, "Error: wolfSSH_Init failed\n"));
return CURLE_FAILED_INIT;
}
#endif
if(flags & CURL_GLOBAL_ACK_EINTR) if(flags & CURL_GLOBAL_ACK_EINTR)
Curl_ack_eintr = 1; Curl_ack_eintr = 1;

View File

@ -1142,6 +1142,11 @@ size_t Curl_ssh_version(char *buffer, size_t buflen)
CURLcode Curl_ssh_init(void) CURLcode Curl_ssh_init(void)
{ {
if(WS_SUCCESS != wolfSSH_Init()) {
DEBUGF(fprintf(stderr, "Error: wolfSSH_Init failed\n"));
return CURLE_FAILED_INIT;
}
return CURLE_OK; return CURLE_OK;
} }
void Curl_ssh_cleanup(void) void Curl_ssh_cleanup(void)