1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Handle failed SSH_FXP_CLOSE requests in sftp_put_file.

It is possible for SSH_FXP_CLOSE requests to fail. This can happen if the
server buffers writes and an error occurs flushing the data to disk while
processing the SSH_FXP_CLOSE request. If the close fails, sftp_put_file now
returns an error as well.
This commit is contained in:
Tim Kosse
2016-12-28 15:34:53 +01:00
committed by Simon Tatham
parent e9a76883ad
commit 6f871e3d22
3 changed files with 11 additions and 4 deletions

4
sftp.h
View File

@ -149,10 +149,10 @@ struct fxp_handle *fxp_opendir_recv(struct sftp_packet *pktin,
struct sftp_request *req);
/*
* Close a file/dir.
* Close a file/dir. Returns 1 on success, 0 on error.
*/
struct sftp_request *fxp_close_send(struct fxp_handle *handle);
void fxp_close_recv(struct sftp_packet *pktin, struct sftp_request *req);
int fxp_close_recv(struct sftp_packet *pktin, struct sftp_request *req);
/*
* Make a directory.