comparison channel.h @ 1835:90ac15aeac43

Bring back recently removed channel->flushing This resolves the "sleep 10&echo hello" case which should return immediately
author Matt Johnston <matt@codeconstruct.com.au>
date Thu, 14 Oct 2021 20:55:15 +0800
parents a7cc3332d8ab
children 6022df862942
comparison
equal deleted inserted replaced
1834:94dc11094e26 1835:90ac15aeac43
69 but for stderr */ 69 but for stderr */
70 70
71 /* whether close/eof messages have been exchanged */ 71 /* whether close/eof messages have been exchanged */
72 int sent_close, recv_close; 72 int sent_close, recv_close;
73 int recv_eof, sent_eof; 73 int recv_eof, sent_eof;
74 /* once flushing is set, readfd will close once no more data is available
75 (not waiting for EOF) */
76 int flushing;
74 77
75 struct dropbear_progress_connection *conn_pending; 78 struct dropbear_progress_connection *conn_pending;
76 int initconn; /* used for TCP forwarding, whether the channel has been 79 int initconn; /* used for TCP forwarding, whether the channel has been
77 fully initialised */ 80 fully initialised */
78 81
91 struct ChanType { 94 struct ChanType {
92 95
93 const char *name; 96 const char *name;
94 /* Sets up the channel */ 97 /* Sets up the channel */
95 int (*inithandler)(struct Channel*); 98 int (*inithandler)(struct Channel*);
96 /* Called to check whether a channel should close, separately from the FD being closed. 99 /* Called to check whether a channel should close, separately from the FD being EOF.
97 Used for noticing process exiting */ 100 Used for noticing process exiting */
98 int (*check_close)(const struct Channel*); 101 int (*check_close)(struct Channel*);
99 /* Handler for ssh_msg_channel_request */ 102 /* Handler for ssh_msg_channel_request */
100 void (*reqhandler)(struct Channel*); 103 void (*reqhandler)(struct Channel*);
101 /* Called prior to sending ssh_msg_channel_close, used for sending exit status */ 104 /* Called prior to sending ssh_msg_channel_close, used for sending exit status */
102 void (*closehandler)(const struct Channel*); 105 void (*closehandler)(const struct Channel*);
103 /* Frees resources, called just prior to channel being removed */ 106 /* Frees resources, called just prior to channel being removed */