search for: chan_output_wait_drain

Displaying 7 results from an estimated 7 matches for "chan_output_wait_drain".

2000 Jan 20
0
OpenSSH problem report on Linux 2.2.14.
...s. ======================================== Where does ostate get set? ---------------------------------------- grep ostate *.c *.h channels.c: chan_init_iostates(c); channels.c: if (ch->ostate == CHAN_OUTPUT_OPEN || channels.c: ch->ostate == CHAN_OUTPUT_WAIT_DRAIN) { channels.c: } else if (ch->ostate == CHAN_OUTPUT_WAIT_DRAIN) { channels.c: debug("X11 rejected %d i%d/o%d", ch->self, ch->istate, ch->ostate); channels.c: debug("X11 rejected %d i%d/o%d...
2000 Jul 23
2
Work around Linux kernel bug provoked by nchan.c
...-1) { - if (shutdown(c->sock, SHUT_RD) < 0) + /* shutdown(sock, SHUT_READ) may return ENOTCONN if the + write side has been closed already. */ + if (shutdown(c->sock, SHUT_RD) < 0 + && (errno != ENOTCONN + || c->ostate == CHAN_OUTPUT_OPEN + || c->ostate == CHAN_OUTPUT_WAIT_DRAIN)) error("channel %d: chan_shutdown_read: shutdown() failed for fd%d [i%d o%d]: %.100s", c->self, c->sock, c->istate, c->ostate, strerror(errno)); } else {
2002 Feb 05
0
New forkoff() and chan_wont_read/write() API
...+chan_wont_write1(Channel *c) +{ + debug("channel %d: wont write", c->self); + switch (c->ostate) { + case CHAN_OUTPUT_OPEN: + debug("channel %d: output open -> wait_ieof", c->self); + chan_send_oclose1(c); + c->ostate = CHAN_OUTPUT_WAIT_IEOF; + break; + case CHAN_OUTPUT_WAIT_DRAIN: + debug("channel %d: output wait_drain -> closed", c->self); + chan_send_oclose1(c); + c->ostate = CHAN_OUTPUT_CLOSED; + break; + default: + debug("channel %d: chan_wont_write for ostate %d", + c->self, c->ostate); + break; + } +} +static void chan_ob...
2000 Jan 31
0
1.2.2 : transport endpoint is not connected.
...i1 o16] " as opposed to [i1 o128]" in the warning messages. Following is a copy of real warning message I collected a few minutes ago. [o128 meant the connection was closed. But o16 seems to suggest that output was open. from nchan.h: #define CHAN_OUTPUT_OPEN 0x10 #define CHAN_OUTPUT_WAIT_DRAIN 0x20 #define CHAN_OUTPUT_WAIT_IEOF 0x40 #define CHAN_OUTPUT_CLOSED 0x80 So something seems to be wrong.] chan_shutdown_read failed for #12/fd16 [i1 o16]: Transport endpoint is not connected chan_shutdown_read failed for #9/fd13 [i1 o128]: Transport endpoint is not...
2003 Dec 16
1
[Bug 773] OpenSSH hangs or silently exits on write failure on stdout/stderr
...I can reproduce both problems with OpenSSH 3.7.1p2 on Linux, and the code affected appears to be common with the current OpenBSD anoncvs version of OpenSSH. The write() call that fails is in chan_handle_wfd. This goes on to call chan_write_failed, which since the channel is in CHAN_OUTPUT_OPEN or CHAN_OUTPUT_WAIT_DRAIN (depending on how much output is being sent) will simply flush the data and then close the file descriptor. No error message is provided. [Note that client_process_output does provide an error message in a similar situation, but it wasn't used since I was using the 2.0 protocol.] Now, suppose...
2020 Oct 14
2
Connection hang, can't stop SSH
Using OpenSSH_8.3p1 I had an open (working) connection to some other box; after a bit of inactivity, some device in the middle seems to have forgotten about the TCP connection (NAT) and broke it. I've got an EscapeChar defined, though; so first I tried to send a BREAK and, when that didn't help (TCP already gone, packets get lost!), I tried (just out of curiosity) a Rekey. Now I can see
2010 Jan 14
1
ssh(1) multiplexing rewrite
...er_check_alloc(&c->input, CHAN_RBUF)) + FD_SET(c->rfd, readset); + if (c->istate == CHAN_INPUT_WAIT_DRAIN) { + /* clear buffer immediately - partial packet */ + buffer_clear(&c->input); + chan_ibuf_empty(c); + } + if (c->ostate == CHAN_OUTPUT_OPEN || + c->ostate == CHAN_OUTPUT_WAIT_DRAIN) { + if (buffer_len(&c->output) > 0) + FD_SET(c->wfd, writeset); + else if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN) + chan_obuf_empty(c); + } +} + /* try to decode a socks4 header */ /* ARGSUSED */ static int @@ -1728,34 +1750,6 @@ channel_handle_efd(Channel *c, fd_set *r /...