libssh: Use sftp_aio instead of sftp_async for sftp_recv

This commit replaces the usage of the old deprecated sftp_async API with
the new sftp_aio API for remote file reading.

Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com>

Closes #17440
This commit is contained in:
Eshan Kelkar 2025-05-23 20:53:17 +05:30 committed by Daniel Stenberg
parent 3bb5e58c10
commit f7af8adadd
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 45 additions and 17 deletions

View file

@ -180,10 +180,13 @@ 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_recv_aio;
sftp_aio sftp_send_aio;
unsigned sftp_send_state; /* 0 or 1 */
#endif
#else
int sftp_file_index; /* for async read */
#endif
sftp_attributes readdir_attrs; /* used by the SFTP readdir actions */
sftp_attributes readdir_link_attrs; /* used by the SFTP readdir actions */
sftp_attributes quote_attrs; /* used by the SFTP_QUOTE state */