Displaying 2 results from an estimated 2 matches for "fsync_flag".
Did you mean:
asyncflag
2025 May 20
2
can function sftp_upload return OK even if an error message is received?
...can happen but that's alone enough reason
to make it perfectly obvious that it can't.
diff --git a/sftp-client.c b/sftp-client.c
index f80352f..964fb3b 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -2010,7 +2010,7 @@ sftp_upload(struct sftp_conn *conn, const char *local_path,
int fsync_flag, int inplace_flag)
{
int r, local_fd;
- u_int openmode, id, status = SSH2_FX_OK, reordered = 0;
+ u_int openmode, id, status = SSH2_FX_OK, failed = 0, reordered = 0;
off_t offset, progress_counter;
u_char type, *handle, *data;
struct sshbuf *msg;
@@ -2150,6 +2150,8 @@ sftp_upload(struct sf...
2025 May 13
1
can function sftp_upload return OK even if an error message is received?
Hi,
With reference to the latest version of the portable OpenSSH, in file sftp-client.c, it looks to me there may be a bug in function sftp_upload.
My understanding is that, when variable "len" is equal to 0, no more SSH_FXP_WRITE messages are sent out and you start draining the queue of pending responses. Variable "len" is set to 0 either when the upload is interrupted, or