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

@baruchsiach baruchsiach commented Oct 26, 2020

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

This comment has been minimized.

@emilengler

emilengler Oct 26, 2020
Contributor

I don't understand the else statement here

This comment has been minimized.

@baruchsiach

baruchsiach Oct 26, 2020
Author Contributor

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 approved these changes Oct 26, 2020
@bagder bagder closed this in ddcc110 Oct 26, 2020
@bagder
Copy link
Member

@bagder 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.