mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Separate backend_send from backend_sendbuffer.
On a similar theme of separating the query operation from the attempted change, backend_send() now no longer has the side effect of returning the current size of the send buffer. Instead, you have to call backend_sendbuffer() every time you want to know that.
This commit is contained in:
@ -270,7 +270,8 @@ static size_t sesschan_send(Channel *chan, bool is_stderr,
|
||||
if (!sess->backend || sess->ignoring_input)
|
||||
return 0;
|
||||
|
||||
return backend_send(sess->backend, data, length);
|
||||
backend_send(sess->backend, data, length);
|
||||
return backend_sendbuffer(sess->backend);
|
||||
}
|
||||
|
||||
static void sesschan_send_eof(Channel *chan)
|
||||
|
@ -1003,18 +1003,16 @@ static void ssh_reconfig(Backend *be, Conf *conf)
|
||||
/*
|
||||
* Called to send data down the SSH connection.
|
||||
*/
|
||||
static size_t ssh_send(Backend *be, const char *buf, size_t len)
|
||||
static void ssh_send(Backend *be, const char *buf, size_t len)
|
||||
{
|
||||
Ssh *ssh = container_of(be, Ssh, backend);
|
||||
|
||||
if (ssh == NULL || ssh->s == NULL)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
bufchain_add(&ssh->user_input, buf, len);
|
||||
if (ssh->base_layer)
|
||||
ssh_ppl_got_user_input(ssh->base_layer);
|
||||
|
||||
return backend_sendbuffer(&ssh->backend);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user