Revert "lib: send eos flag"

This reverts commit be93299f10.
This commit is contained in:
Daniel Stenberg 2024-07-19 01:38:05 +02:00
parent 46ef34c053
commit 25321de30e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
41 changed files with 166 additions and 200 deletions

View file

@ -2404,13 +2404,12 @@ static CURLcode scp_done(struct Curl_easy *data, CURLcode status,
}
static ssize_t scp_send(struct Curl_easy *data, int sockindex,
const void *mem, size_t len, bool eos, CURLcode *err)
const void *mem, size_t len, CURLcode *err)
{
int rc;
struct connectdata *conn = data->conn;
(void) sockindex; /* we only support SCP on the fixed known primary socket */
(void) err;
(void)eos;
rc = ssh_scp_write(conn->proto.sshc.scp_session, mem, len);
@ -2553,13 +2552,11 @@ static CURLcode sftp_done(struct Curl_easy *data, CURLcode status,
/* return number of sent bytes */
static ssize_t sftp_send(struct Curl_easy *data, int sockindex,
const void *mem, size_t len, bool eos,
CURLcode *err)
const void *mem, size_t len, CURLcode *err)
{
ssize_t nwrite;
struct connectdata *conn = data->conn;
(void)sockindex;
(void)eos;
/* limit the writes to the maximum specified in Section 3 of
* https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02

View file

@ -3229,7 +3229,7 @@ static ssize_t ssh_tls_send(libssh2_socket_t sock, const void *buffer,
/* swap in the TLS writer function for this call only, and then swap back
the SSH one again */
conn->send[0] = ssh->tls_send;
result = Curl_conn_send(data, socknum, buffer, length, FALSE, &nwrite);
result = Curl_conn_send(data, socknum, buffer, length, &nwrite);
conn->send[0] = backup;
if(result == CURLE_AGAIN)
return -EAGAIN; /* magic return code for libssh2 */
@ -3540,13 +3540,12 @@ static CURLcode scp_done(struct Curl_easy *data, CURLcode status,
}
static ssize_t scp_send(struct Curl_easy *data, int sockindex,
const void *mem, size_t len, bool eos, CURLcode *err)
const void *mem, size_t len, CURLcode *err)
{
ssize_t nwrite;
struct connectdata *conn = data->conn;
struct ssh_conn *sshc = &conn->proto.sshc;
(void)sockindex; /* we only support SCP on the fixed known primary socket */
(void)eos;
/* libssh2_channel_write() returns int! */
nwrite = (ssize_t) libssh2_channel_write(sshc->ssh_channel, mem, len);
@ -3679,13 +3678,12 @@ static CURLcode sftp_done(struct Curl_easy *data, CURLcode status,
/* return number of sent bytes */
static ssize_t sftp_send(struct Curl_easy *data, int sockindex,
const void *mem, size_t len, bool eos, CURLcode *err)
const void *mem, size_t len, CURLcode *err)
{
ssize_t nwrite;
struct connectdata *conn = data->conn;
struct ssh_conn *sshc = &conn->proto.sshc;
(void)sockindex;
(void)eos;
nwrite = libssh2_sftp_write(sshc->sftp_handle, mem, len);