summaryrefslogtreecommitdiff
path: root/nchan.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:27:28 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:27:28 +1100
commit89a9232e414e7777d500a944a3fe7639d5e6c60f (patch)
tree856735c03a182b3bdbbea37dc51d9573c563b6c9 /nchan.c
parentabea8ee1c3bd404fdab316f359061a1fd3292099 (diff)
- markus@cvs.openbsd.org 2002/01/14 13:22:35
[nchan.c] chan_send_oclose1() no longer calls chan_shutdown_write(); ok provos@
Diffstat (limited to 'nchan.c')
-rw-r--r--nchan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nchan.c b/nchan.c
index 04266d32..ff7607b9 100644
--- a/nchan.c
+++ b/nchan.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: nchan.c,v 1.37 2002/01/13 21:31:20 markus Exp $");
+RCSID("$OpenBSD: nchan.c,v 1.38 2002/01/14 13:22:35 markus Exp $");
#include "ssh1.h"
#include "ssh2.h"
@@ -191,10 +191,12 @@ chan_write_failed1(Channel *c)
debug("channel %d: write failed", c->self);
switch (c->ostate) {
case CHAN_OUTPUT_OPEN:
+ chan_shutdown_write(c);
chan_send_oclose1(c);
chan_set_ostate(c, CHAN_OUTPUT_WAIT_IEOF);
break;
case CHAN_OUTPUT_WAIT_DRAIN:
+ chan_shutdown_write(c);
chan_send_oclose1(c);
chan_set_ostate(c, CHAN_OUTPUT_CLOSED);
break;
@@ -215,6 +217,7 @@ chan_obuf_empty1(Channel *c)
}
switch (c->ostate) {
case CHAN_OUTPUT_WAIT_DRAIN:
+ chan_shutdown_write(c);
chan_send_oclose1(c);
chan_set_ostate(c, CHAN_OUTPUT_CLOSED);
break;
@@ -248,7 +251,6 @@ chan_send_oclose1(Channel *c)
switch (c->ostate) {
case CHAN_OUTPUT_OPEN:
case CHAN_OUTPUT_WAIT_DRAIN:
- chan_shutdown_write(c);
buffer_clear(&c->output);
packet_start(SSH_MSG_CHANNEL_OUTPUT_CLOSE);
packet_put_int(c->remote_id);