mirror of
https://github.com/curl/curl.git
synced 2026-08-25 13:53:37 +03:00
parent
0236276c3d
commit
5a263710f6
30 changed files with 60 additions and 60 deletions
|
|
@ -2269,7 +2269,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
(sftperr != LIBSSH2_FX_PERMISSION_DENIED)) {
|
||||
result = sftp_libssh2_error_to_CURLE(sftperr);
|
||||
state(data, SSH_SFTP_CLOSE);
|
||||
sshc->actualcode = result?result:CURLE_SSH;
|
||||
sshc->actualcode = result ? result : CURLE_SSH;
|
||||
break;
|
||||
}
|
||||
rc = 0; /* clear rc and continue */
|
||||
|
|
@ -2304,7 +2304,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
sftp_libssh2_strerror(sftperr));
|
||||
state(data, SSH_SFTP_CLOSE);
|
||||
result = sftp_libssh2_error_to_CURLE(sftperr);
|
||||
sshc->actualcode = result?result:CURLE_SSH;
|
||||
sshc->actualcode = result ? result : CURLE_SSH;
|
||||
break;
|
||||
}
|
||||
sshp->readdir_filename = malloc(PATH_MAX + 1);
|
||||
|
|
@ -2384,7 +2384,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
else if(rc < 0) {
|
||||
sftperr = libssh2_sftp_last_error(sshc->sftp_session);
|
||||
result = sftp_libssh2_error_to_CURLE(sftperr);
|
||||
sshc->actualcode = result?result:CURLE_SSH;
|
||||
sshc->actualcode = result ? result : CURLE_SSH;
|
||||
failf(data, "Could not open remote file for reading: %s :: %d",
|
||||
sftp_libssh2_strerror(sftperr),
|
||||
libssh2_session_last_errno(sshc->ssh_session));
|
||||
|
|
@ -2474,7 +2474,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
sftp_libssh2_strerror(sftperr));
|
||||
state(data, SSH_SFTP_CLOSE);
|
||||
result = sftp_libssh2_error_to_CURLE(sftperr);
|
||||
sshc->actualcode = result?result:CURLE_SSH;
|
||||
sshc->actualcode = result ? result : CURLE_SSH;
|
||||
break;
|
||||
}
|
||||
state(data, SSH_SFTP_DOWNLOAD_STAT);
|
||||
|
|
@ -3545,7 +3545,7 @@ static ssize_t scp_send(struct Curl_easy *data, int sockindex,
|
|||
/* libssh2_channel_write() returns int! */
|
||||
nwrite = (ssize_t) libssh2_channel_write(sshc->ssh_channel, mem, len);
|
||||
|
||||
ssh_block2waitfor(data, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
|
||||
ssh_block2waitfor(data, (nwrite == LIBSSH2_ERROR_EAGAIN) ? TRUE : FALSE);
|
||||
|
||||
if(nwrite == LIBSSH2_ERROR_EAGAIN) {
|
||||
*err = CURLE_AGAIN;
|
||||
|
|
@ -3570,7 +3570,7 @@ static ssize_t scp_recv(struct Curl_easy *data, int sockindex,
|
|||
/* libssh2_channel_read() returns int */
|
||||
nread = (ssize_t) libssh2_channel_read(sshc->ssh_channel, mem, len);
|
||||
|
||||
ssh_block2waitfor(data, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
|
||||
ssh_block2waitfor(data, (nread == LIBSSH2_ERROR_EAGAIN) ? TRUE : FALSE);
|
||||
if(nread == LIBSSH2_ERROR_EAGAIN) {
|
||||
*err = CURLE_AGAIN;
|
||||
nread = -1;
|
||||
|
|
@ -3683,7 +3683,7 @@ static ssize_t sftp_send(struct Curl_easy *data, int sockindex,
|
|||
|
||||
nwrite = libssh2_sftp_write(sshc->sftp_handle, mem, len);
|
||||
|
||||
ssh_block2waitfor(data, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
|
||||
ssh_block2waitfor(data, (nwrite == LIBSSH2_ERROR_EAGAIN) ? TRUE : FALSE);
|
||||
|
||||
if(nwrite == LIBSSH2_ERROR_EAGAIN) {
|
||||
*err = CURLE_AGAIN;
|
||||
|
|
@ -3711,7 +3711,7 @@ static ssize_t sftp_recv(struct Curl_easy *data, int sockindex,
|
|||
|
||||
nread = libssh2_sftp_read(sshc->sftp_handle, mem, len);
|
||||
|
||||
ssh_block2waitfor(data, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
|
||||
ssh_block2waitfor(data, (nread == LIBSSH2_ERROR_EAGAIN) ? TRUE : FALSE);
|
||||
|
||||
if(nread == LIBSSH2_ERROR_EAGAIN) {
|
||||
*err = CURLE_AGAIN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue