diff options
author | Baruch Siach <baruch@tkos.co.il> | 2020-10-26 06:56:49 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-10-26 09:18:35 +0100 |
commit | ddcc110bfc7aba4c0d73d2bacdfa7bd48a34bde6 (patch) | |
tree | 9399e6c1e4a114a15aab5e232860f18dde6ee1d9 | |
parent | 96450a1a33ec22cb54b20dbac08ebdf14648582f (diff) | |
download | curl-ddcc110bfc7aba4c0d73d2bacdfa7bd48a34bde6.tar.gz |
libssh2: fix build with disabled proxy support
Build breaks because the http_proxy field is missing:
vssh/libssh2.c:3119:10: error: 'struct connectdata' has no member named 'http_proxy'
Regression from #6021, shipped in curl 7.73.0
Closes #6125
-rw-r--r-- | lib/vssh/libssh2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c index 6c6db049b..b9ed5be90 100644 --- a/lib/vssh/libssh2.c +++ b/lib/vssh/libssh2.c @@ -3017,6 +3017,7 @@ static CURLcode ssh_setup_connection(struct connectdata *conn) static Curl_recv scp_recv, sftp_recv; static Curl_send scp_send, sftp_send; +#ifndef CURL_DISABLE_PROXY static ssize_t ssh_tls_recv(libssh2_socket_t sock, void *buffer, size_t length, int flags, void **abstract) { @@ -3052,6 +3053,7 @@ static ssize_t ssh_tls_send(libssh2_socket_t sock, const void *buffer, Curl_debug(conn->data, CURLINFO_DATA_OUT, (char *)buffer, (size_t)nwrite); return nwrite; } +#endif /* * Curl_ssh_connect() gets called from Curl_protocol_connect() to allow us to @@ -3094,6 +3096,7 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done) return CURLE_FAILED_INIT; } +#ifndef CURL_DISABLE_PROXY if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) { /* * This crazy union dance is here to avoid assigning a void pointer a @@ -3132,7 +3135,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done) libssh2_session_callback_set(ssh->ssh_session, LIBSSH2_CALLBACK_SEND, sshsend.sendp); } - else if(conn->handler->protocol & CURLPROTO_SCP) { + else +#endif /* CURL_DISABLE_PROXY */ + if(conn->handler->protocol & CURLPROTO_SCP) { conn->recv[FIRSTSOCKET] = scp_recv; conn->send[FIRSTSOCKET] = scp_send; } |