Skip to content

libssh2: fix build with disabled proxy support#6125

Closed
baruchsiach wants to merge 1 commit intocurl:masterfrom
baruchsiach:fix-libssh2-no-proxy
Closed

libssh2: fix build with disabled proxy support#6125
baruchsiach wants to merge 1 commit intocurl:masterfrom
baruchsiach:fix-libssh2-no-proxy

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) {
		  ^
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.

3 participants