]> andersk Git - openssh.git/blobdiff - nchan.c
- Remove references to SSLeay.
[openssh.git] / nchan.c
diff --git a/nchan.c b/nchan.c
index cef94323908a4629a79d63454f13cb5b82e3d0d1..51e5ba3c21112cc3a2863cb4a0bbd58f4b4640a6 100644 (file)
--- a/nchan.c
+++ b/nchan.c
@@ -139,6 +139,25 @@ static void
 chan_rcvd_ieof1(Channel *c)
 {
        debug("channel %d: rcvd ieof", c->self);
+       if (c->type != SSH_CHANNEL_OPEN) {
+               debug("channel %d: non-open", c->self);
+               if (c->istate == CHAN_INPUT_OPEN) {
+                       debug("channel %d: non-open: input open -> wait_oclose", c->self);
+                       chan_shutdown_read(c);
+                       chan_send_ieof1(c);
+                       c->istate = CHAN_INPUT_WAIT_OCLOSE;
+               } else {
+                       error("channel %d: istate %d != open", c->self, c->istate);
+               }
+               if (c->ostate == CHAN_OUTPUT_OPEN) {
+                       debug("channel %d: non-open: output open -> closed", c->self);
+                       chan_send_oclose1(c);
+                       c->ostate = CHAN_OUTPUT_CLOSED;
+               } else {
+                       error("channel %d: ostate %d != open", c->self, c->ostate);
+               }
+               return;
+       }
        switch (c->ostate) {
        case CHAN_OUTPUT_OPEN:
                debug("channel %d: output open -> drain", c->self);
@@ -314,7 +333,7 @@ chan_write_failed2(Channel *c)
        switch (c->ostate) {
        case CHAN_OUTPUT_OPEN:
                debug("channel %d: output open -> closed", c->self);
-               chan_shutdown_write(c); // ??
+               chan_shutdown_write(c); /* ?? */
                c->ostate = CHAN_OUTPUT_CLOSED;
                break;
        case CHAN_OUTPUT_WAIT_DRAIN:
This page took 0.162469 seconds and 4 git commands to generate.