Displaying 2 results from an estimated 2 matches for "request_find".
Did you mean:
request_end
2025 May 20
2
can function sftp_upload return OK even if an error message is received?
...truct sftp_conn *conn, const char *local_path,
if ((r = sshbuf_get_u32(msg, &status)) != 0)
fatal_fr(r, "parse status");
debug3("SSH2_FXP_STATUS %u", status);
+ if (status != SSH2_FX_OK)
+ failed = 1;
/* Find the request in our queue */
if ((ack = request_find(&acks, rid)) == NULL)
@@ -2219,7 +2221,7 @@ sftp_upload(struct sftp_conn *conn, const char *local_path,
free(handle);
- return status == SSH2_FX_OK ? 0 : -1;
+ return status != SSH2_FX_OK || failed ? -1 : 0;
}
static int
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