simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Jun 27 13:59:48 BST 2021
TL;DR:
6246ff3f New Seat callback, seat_sent().
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2021-06-27 13:59:48
commit 6246ff3f0a08c3d551f59c07813fee4640a67926
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6246ff3f0a08c3d551f59c07813fee4640a67926;hp=ff941299cfc427f8ba2939d1950d8f954e3e3602
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Jun 27 13:52:48 2021 +0100
New Seat callback, seat_sent().
This is used to notify the Seat that some data has been cleared from
the backend's outgoing data buffer. In other words, it notifies the
Seat that it might be worth calling backend_sendbuffer() again.
We've never needed this before, because until now, Seats have always
been the 'main program' part of the application, meaning they were
also in control of the event loop. So they've been able to call
backend_sendbuffer() proactively, every time they go round the event
loop, instead of having to wait for a callback.
But now, the SSH proxy is the first example of a Seat without
privileged access to the event loop, so it has no way to find out that
the backend's sendbuffer has got smaller. And without that, it can't
pass that notification on to plug_sent, to unblock in turn whatever
the proxied connection might have been waiting to send.
In fact, before this commit, sshproxy.c never called plug_sent at all.
As a result, large data uploads over an SSH jump host would hang
forever as soon as the outgoing buffer filled up for the first time:
the main backend (to which sshproxy.c was acting as a Socket) would
carefully stop filling up the buffer, and then never receive the call
to plug_sent that would cause it to start again.
The new callback is ignored everywhere except in sshproxy.c. It might
be a good idea to remove backend_sendbuffer() entirely and convert all
previous uses of it into non-empty implementations of this callback,
so that we've only got one system; but for the moment, I haven't done
that.
otherbackends/raw.c | 1 +
otherbackends/rlogin.c | 1 +
otherbackends/supdup.c | 1 +
otherbackends/telnet.c | 1 +
pscp.c | 1 +
psftp.c | 1 +
putty.h | 14 ++++++++++++++
ssh.h | 1 +
ssh/bpp-bare.c | 2 ++
ssh/bpp1.c | 2 ++
ssh/bpp2.c | 2 ++
ssh/connection2.c | 1 +
ssh/server.c | 5 +++++
ssh/sesschan.c | 1 +
ssh/ssh.c | 6 ++++++
ssh/transport2.c | 2 ++
sshproxy.c | 7 +++++++
unix/plink.c | 1 +
unix/serial.c | 1 +
unix/window.c | 1 +
utils/nullseat.c | 1 +
windows/plink.c | 1 +
windows/serial.c | 1 +
windows/window.c | 1 +
24 files changed, 56 insertions(+)
More information about the tartarus-commits
mailing list