summaryrefslogtreecommitdiff
path: root/nchan.c
diff options
context:
space:
mode:
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 04266d326..ff7607b9c 100644
--- a/nchan.c
+++ b/nchan.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: nchan.c,v 1.37 2002/01/13 21:31:20 markus Exp $"); 26RCSID("$OpenBSD: nchan.c,v 1.38 2002/01/14 13:22:35 markus Exp $");
27 27
28#include "ssh1.h" 28#include "ssh1.h"
29#include "ssh2.h" 29#include "ssh2.h"
@@ -191,10 +191,12 @@ chan_write_failed1(Channel *c)
191 debug("channel %d: write failed", c->self); 191 debug("channel %d: write failed", c->self);
192 switch (c->ostate) { 192 switch (c->ostate) {
193 case CHAN_OUTPUT_OPEN: 193 case CHAN_OUTPUT_OPEN:
194 chan_shutdown_write(c);
194 chan_send_oclose1(c); 195 chan_send_oclose1(c);
195 chan_set_ostate(c, CHAN_OUTPUT_WAIT_IEOF); 196 chan_set_ostate(c, CHAN_OUTPUT_WAIT_IEOF);
196 break; 197 break;
197 case CHAN_OUTPUT_WAIT_DRAIN: 198 case CHAN_OUTPUT_WAIT_DRAIN:
199 chan_shutdown_write(c);
198 chan_send_oclose1(c); 200 chan_send_oclose1(c);
199 chan_set_ostate(c, CHAN_OUTPUT_CLOSED); 201 chan_set_ostate(c, CHAN_OUTPUT_CLOSED);
200 break; 202 break;
@@ -215,6 +217,7 @@ chan_obuf_empty1(Channel *c)
215 } 217 }
216 switch (c->ostate) { 218 switch (c->ostate) {
217 case CHAN_OUTPUT_WAIT_DRAIN: 219 case CHAN_OUTPUT_WAIT_DRAIN:
220 chan_shutdown_write(c);
218 chan_send_oclose1(c); 221 chan_send_oclose1(c);
219 chan_set_ostate(c, CHAN_OUTPUT_CLOSED); 222 chan_set_ostate(c, CHAN_OUTPUT_CLOSED);
220 break; 223 break;
@@ -248,7 +251,6 @@ chan_send_oclose1(Channel *c)
248 switch (c->ostate) { 251 switch (c->ostate) {
249 case CHAN_OUTPUT_OPEN: 252 case CHAN_OUTPUT_OPEN:
250 case CHAN_OUTPUT_WAIT_DRAIN: 253 case CHAN_OUTPUT_WAIT_DRAIN:
251 chan_shutdown_write(c);
252 buffer_clear(&c->output); 254 buffer_clear(&c->output);
253 packet_start(SSH_MSG_CHANNEL_OUTPUT_CLOSE); 255 packet_start(SSH_MSG_CHANNEL_OUTPUT_CLOSE);
254 packet_put_int(c->remote_id); 256 packet_put_int(c->remote_id);