diff options
author | dartraiden <wowemuh@gmail.com> | 2020-12-12 21:52:50 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2020-12-12 21:52:50 +0300 |
commit | 3b96a0dcef3c7e1de852025cfea5a9e56486021c (patch) | |
tree | e0f3d4006a618993b1c70f507cc32c707db5e73b /libs/libcurl/src/vssh/libssh.c | |
parent | 346d20620a22103175778d0ae96299af9f93c7ea (diff) |
libcurl: update to 7.74.0
Diffstat (limited to 'libs/libcurl/src/vssh/libssh.c')
-rw-r--r-- | libs/libcurl/src/vssh/libssh.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/libs/libcurl/src/vssh/libssh.c b/libs/libcurl/src/vssh/libssh.c index acdb4e7534..e79d8e823c 100644 --- a/libs/libcurl/src/vssh/libssh.c +++ b/libs/libcurl/src/vssh/libssh.c @@ -12,7 +12,7 @@ * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -664,7 +664,7 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block) { CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; - struct SSHPROTO *protop = data->req.protop; + struct SSHPROTO *protop = data->req.p.ssh; struct ssh_conn *sshc = &conn->proto.sshc; curl_socket_t sock = conn->sock[FIRSTSOCKET]; int rc = SSH_NO_ERROR, err; @@ -1432,11 +1432,8 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block) data->req.bytecount += sshc->readdir_len + 1; /* output debug output if that is requested */ - if(data->set.verbose) { - Curl_debug(data, CURLINFO_DATA_OUT, - (char *)sshc->readdir_filename, - sshc->readdir_len); - } + Curl_debug(data, CURLINFO_DATA_OUT, (char *)sshc->readdir_filename, + sshc->readdir_len); } else { sshc->readdir_currLen = strlen(sshc->readdir_longentry); @@ -1548,12 +1545,9 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block) sshc->readdir_currLen); if(!result) { - /* output debug output if that is requested */ - if(data->set.verbose) { - Curl_debug(data, CURLINFO_DATA_OUT, sshc->readdir_line, - sshc->readdir_currLen); - } + Curl_debug(data, CURLINFO_DATA_OUT, sshc->readdir_line, + sshc->readdir_currLen); data->req.bytecount += sshc->readdir_currLen; } Curl_safefree(sshc->readdir_line); @@ -2131,7 +2125,7 @@ static CURLcode myssh_setup_connection(struct connectdata *conn) { struct SSHPROTO *ssh; - conn->data->req.protop = ssh = calloc(1, sizeof(struct SSHPROTO)); + conn->data->req.p.ssh = ssh = calloc(1, sizeof(struct SSHPROTO)); if(!ssh) return CURLE_OUT_OF_MEMORY; @@ -2154,7 +2148,7 @@ static CURLcode myssh_connect(struct connectdata *conn, bool *done) int rc; /* initialize per-handle data if not already */ - if(!data->req.protop) + if(!data->req.p.ssh) myssh_setup_connection(conn); /* We default to persistent connections. We set this already in this connect @@ -2355,7 +2349,7 @@ static CURLcode scp_disconnect(struct connectdata *conn, static CURLcode myssh_done(struct connectdata *conn, CURLcode status) { CURLcode result = CURLE_OK; - struct SSHPROTO *protop = conn->data->req.protop; + struct SSHPROTO *protop = conn->data->req.p.ssh; if(!status) { /* run the state-machine */ @@ -2608,7 +2602,7 @@ static void sftp_quote(struct connectdata *conn) { const char *cp; struct Curl_easy *data = conn->data; - struct SSHPROTO *protop = data->req.protop; + struct SSHPROTO *protop = data->req.p.ssh; struct ssh_conn *sshc = &conn->proto.sshc; CURLcode result; @@ -2638,10 +2632,9 @@ static void sftp_quote(struct connectdata *conn) sshc->nextstate = SSH_NO_STATE; return; } - if(data->set.verbose) { - Curl_debug(data, CURLINFO_HEADER_OUT, (char *) "PWD\n", 4); - Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp)); - } + Curl_debug(data, CURLINFO_HEADER_OUT, (char *) "PWD\n", 4); + Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp)); + /* this sends an FTP-like "header" to the header callback so that the current directory can be read very similar to how it is read when using ordinary FTP. */ |