version 1.66, 2017/09/12 06:32:07 |
version 1.67, 2017/09/12 06:35:32 |
|
|
debug2("channel %d: send eof", c->self); |
debug2("channel %d: send eof", c->self); |
switch (c->istate) { |
switch (c->istate) { |
case CHAN_INPUT_WAIT_DRAIN: |
case CHAN_INPUT_WAIT_DRAIN: |
|
if (!c->have_remote_id) |
|
fatal("%s: channel %d: no remote_id", |
|
__func__, c->self); |
if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_EOF)) != 0 || |
if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_EOF)) != 0 || |
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 || |
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 || |
(r = sshpkt_send(ssh)) != 0) |
(r = sshpkt_send(ssh)) != 0) |
|
|
} else if (c->flags & CHAN_CLOSE_SENT) { |
} else if (c->flags & CHAN_CLOSE_SENT) { |
error("channel %d: already sent close", c->self); |
error("channel %d: already sent close", c->self); |
} else { |
} else { |
|
if (!c->have_remote_id) |
|
fatal("%s: channel %d: no remote_id", |
|
__func__, c->self); |
if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_CLOSE)) != 0 || |
if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_CLOSE)) != 0 || |
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 || |
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 || |
(r = sshpkt_send(ssh)) != 0) |
(r = sshpkt_send(ssh)) != 0) |
|
|
} |
} |
if (!(datafellows & SSH_NEW_OPENSSH)) |
if (!(datafellows & SSH_NEW_OPENSSH)) |
return; |
return; |
|
if (!c->have_remote_id) |
|
fatal("%s: channel %d: no remote_id", __func__, c->self); |
if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_REQUEST)) != 0 || |
if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_REQUEST)) != 0 || |
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 || |
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 || |
(r = sshpkt_put_cstring(ssh, "eow@openssh.com")) != 0 || |
(r = sshpkt_put_cstring(ssh, "eow@openssh.com")) != 0 || |