version 1.401, 2020/07/03 07:25:18 |
version 1.402, 2020/09/20 05:47:25 |
|
|
struct ssh_channels *sc = ssh->chanctxt; |
struct ssh_channels *sc = ssh->chanctxt; |
u_int i, found; |
u_int i, found; |
Channel *c; |
Channel *c; |
|
int r; |
|
|
/* Try to find a free slot where to put the new channel. */ |
/* Try to find a free slot where to put the new channel. */ |
for (i = 0; i < sc->channels_alloc; i++) { |
for (i = 0; i < sc->channels_alloc; i++) { |
|
|
(c->output = sshbuf_new()) == NULL || |
(c->output = sshbuf_new()) == NULL || |
(c->extended = sshbuf_new()) == NULL) |
(c->extended = sshbuf_new()) == NULL) |
fatal("%s: sshbuf_new failed", __func__); |
fatal("%s: sshbuf_new failed", __func__); |
|
if ((r = sshbuf_set_max_size(c->input, CHAN_INPUT_MAX)) != 0) |
|
fatal("%s: sshbuf_set_max_size: %s", __func__, ssh_err(r)); |
c->ostate = CHAN_OUTPUT_OPEN; |
c->ostate = CHAN_OUTPUT_OPEN; |
c->istate = CHAN_INPUT_OPEN; |
c->istate = CHAN_INPUT_OPEN; |
channel_register_fds(ssh, c, rfd, wfd, efd, extusage, nonblock, 0); |
channel_register_fds(ssh, c, rfd, wfd, efd, extusage, nonblock, 0); |