mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-12 16:47:42 -05:00
sshshare: notify cl when last downstream goes away.
The check_termination function in ssh2connection is supposed to be called whenever it's possible that we've run out of (a) channels, and (b) sharing downstreams. I've been calling it on every channel close, but apparently completely forgot to add a callback from sshshare.c that also arranges to call it when we run out of downstreams.
This commit is contained in:
@ -127,6 +127,7 @@ static void ssh2_delete_sharing_channel(
|
||||
ConnectionLayer *cl, unsigned localid);
|
||||
static void ssh2_sharing_queue_global_request(
|
||||
ConnectionLayer *cl, ssh_sharing_connstate *share_ctx);
|
||||
static void ssh2_sharing_no_more_downstreams(ConnectionLayer *cl);
|
||||
static int ssh2_agent_forwarding_permitted(ConnectionLayer *cl);
|
||||
static void ssh2_terminal_size(ConnectionLayer *cl, int width, int height);
|
||||
static void ssh2_stdout_unthrottle(ConnectionLayer *cl, int bufsize);
|
||||
@ -144,6 +145,7 @@ static const struct ConnectionLayerVtable ssh2_connlayer_vtable = {
|
||||
ssh2_alloc_sharing_channel,
|
||||
ssh2_delete_sharing_channel,
|
||||
ssh2_sharing_queue_global_request,
|
||||
ssh2_sharing_no_more_downstreams,
|
||||
ssh2_agent_forwarding_permitted,
|
||||
ssh2_terminal_size,
|
||||
ssh2_stdout_unthrottle,
|
||||
@ -2096,6 +2098,13 @@ static void ssh2_sharing_queue_global_request(
|
||||
ssh2_queue_global_request_handler(s, ssh2_sharing_globreq_response, cs);
|
||||
}
|
||||
|
||||
static void ssh2_sharing_no_more_downstreams(ConnectionLayer *cl)
|
||||
{
|
||||
struct ssh2_connection_state *s =
|
||||
FROMFIELD(cl, struct ssh2_connection_state, cl);
|
||||
queue_toplevel_callback(ssh2_check_termination_callback, s);
|
||||
}
|
||||
|
||||
static struct X11FakeAuth *ssh2_add_sharing_x11_display(
|
||||
ConnectionLayer *cl, int authtype, ssh_sharing_connstate *share_cs,
|
||||
share_channel *share_chan)
|
||||
|
Reference in New Issue
Block a user