diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2020-11-02 17:34:04 +0100 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2020-11-02 17:34:04 +0100 |
| commit | f5341d0dfa0f1ba98b0f9306ae6cb985258af2ed (patch) | |
| tree | 54bb308146bdbd9e8da1fd228b8757967ac8014e /lib/vssh/libssh.c | |
| parent | 606d213766fb94a4653ec41ef3b91cc0a96b9570 (diff) | |
| download | curl-bagder/debug-verbose-check.tar.gz | |
sendf: move the verbose-check into Curl_debugbagder/debug-verbose-check
Saves us from having the same check done everywhere.
Diffstat (limited to 'lib/vssh/libssh.c')
| -rw-r--r-- | lib/vssh/libssh.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index acdb4e753..b8058df51 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -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); @@ -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. */ |
