Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libssh2: fix build with disabled proxy support #6125

Closed
wants to merge 1 commit into from

Conversation

baruchsiach
Copy link
Contributor

Build breaks because the http_proxy field is missing:

vssh/libssh2.c: In function 'ssh_connect':
vssh/libssh2.c:3119:10: error: 'struct connectdata' has no member named 'http_proxy'
if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) {
^

Build breaks because the http_proxy field is missing:

vssh/libssh2.c: In function 'ssh_connect':
vssh/libssh2.c:3119:10: error: 'struct connectdata' has no member named 'http_proxy'
   if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) {
		  ^
@@ -3132,7 +3133,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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the else statement here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The else clause is part of the if statement that is now conditioned under CURL_DISABLE_PROXY. This is how the code looks after the change:

#ifndef CURL_DISABLE_PROXY
  if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) {
    ...
  }
  else
#endif /* CURL_DISABLE_PROXY */
  if(conn->handler->protocol & CURLPROTO_SCP) {
    conn->recv[FIRSTSOCKET] = scp_recv;
    conn->send[FIRSTSOCKET] = scp_send;
  }
  else {
    ...

@bagder bagder closed this in ddcc110 Oct 26, 2020
@bagder
Copy link
Member

bagder commented Oct 26, 2020

Thanks!

(I extended the fix slightly before I merged.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants