mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-15 10:07:39 -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:
3
sftp.c
3
sftp.c
@ -658,11 +658,12 @@ struct sftp_request *fxp_close_send(struct fxp_handle *handle)
|
||||
return req;
|
||||
}
|
||||
|
||||
void fxp_close_recv(struct sftp_packet *pktin, struct sftp_request *req)
|
||||
int fxp_close_recv(struct sftp_packet *pktin, struct sftp_request *req)
|
||||
{
|
||||
sfree(req);
|
||||
fxp_got_status(pktin);
|
||||
sftp_pkt_free(pktin);
|
||||
return fxp_errtype == SSH_FX_OK;
|
||||
}
|
||||
|
||||
struct sftp_request *fxp_mkdir_send(const char *path)
|
||||
|
Reference in New Issue
Block a user