libssh: Rename struct ssh_con member sftp_aio to sftp_send_aio

Renamed sftp_aio -> sftp_send_aio to highlight its association
with sftp_send() (This is consistent with how sftp_send_state,
associated with sftp_send() has been named)

Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com>
This commit is contained in:
Eshan Kelkar 2025-05-23 20:53:17 +05:30
parent 3aecfa927c
commit 91278dec41
2 changed files with 9 additions and 9 deletions

View file

@ -1460,9 +1460,9 @@ static int myssh_in_SFTP_SHUTDOWN(struct Curl_easy *data,
before we proceed */
ssh_set_blocking(sshc->ssh_session, 0);
#if LIBSSH_VERSION_INT > SSH_VERSION_INT(0, 11, 0)
if(sshc->sftp_aio) {
sftp_aio_free(sshc->sftp_aio);
sshc->sftp_aio = NULL;
if(sshc->sftp_send_aio) {
sftp_aio_free(sshc->sftp_send_aio);
sshc->sftp_send_aio = NULL;
}
#endif
@ -3035,21 +3035,21 @@ static CURLcode sftp_send(struct Curl_easy *data, int sockindex,
case 0:
sftp_file_set_nonblocking(sshc->sftp_file);
if(sftp_aio_begin_write(sshc->sftp_file, mem, len,
&sshc->sftp_aio) == SSH_ERROR) {
&sshc->sftp_send_aio) == SSH_ERROR) {
return CURLE_SEND_ERROR;
}
sshc->sftp_send_state = 1;
FALLTHROUGH();
case 1:
nwrite = sftp_aio_wait_write(&sshc->sftp_aio);
nwrite = sftp_aio_wait_write(&sshc->sftp_send_aio);
myssh_block2waitfor(conn, sshc, (nwrite == SSH_AGAIN) ? TRUE : FALSE);
if(nwrite == SSH_AGAIN)
return CURLE_AGAIN;
else if(nwrite < 0)
return CURLE_SEND_ERROR;
if(sshc->sftp_aio) {
sftp_aio_free(sshc->sftp_aio);
sshc->sftp_aio = NULL;
if(sshc->sftp_send_aio) {
sftp_aio_free(sshc->sftp_send_aio);
sshc->sftp_send_aio = NULL;
}
sshc->sftp_send_state = 0;
*pnwritten = (size_t)nwrite;

View file

@ -180,7 +180,7 @@ struct ssh_conn {
unsigned sftp_recv_state; /* 0 or 1 */
#if LIBSSH_VERSION_INT > SSH_VERSION_INT(0, 11, 0)
sftp_aio sftp_aio;
sftp_aio sftp_send_aio;
unsigned sftp_send_state; /* 0 or 1 */
#endif
int sftp_file_index; /* for async read */