diff options
Diffstat (limited to 'nchan.c')
-rw-r--r-- | nchan.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: nchan.c,v 1.33 2001/12/19 07:18:56 deraadt Exp $"); | 26 | RCSID("$OpenBSD: nchan.c,v 1.34 2002/01/09 17:26:35 markus Exp $"); |
27 | 27 | ||
28 | #include "ssh1.h" | 28 | #include "ssh1.h" |
29 | #include "ssh2.h" | 29 | #include "ssh2.h" |
@@ -266,7 +266,7 @@ chan_send_oclose1(Channel *c) | |||
266 | case CHAN_OUTPUT_OPEN: | 266 | case CHAN_OUTPUT_OPEN: |
267 | case CHAN_OUTPUT_WAIT_DRAIN: | 267 | case CHAN_OUTPUT_WAIT_DRAIN: |
268 | chan_shutdown_write(c); | 268 | chan_shutdown_write(c); |
269 | buffer_consume(&c->output, buffer_len(&c->output)); | 269 | buffer_clear(&c->output); |
270 | packet_start(SSH_MSG_CHANNEL_OUTPUT_CLOSE); | 270 | packet_start(SSH_MSG_CHANNEL_OUTPUT_CLOSE); |
271 | packet_put_int(c->remote_id); | 271 | packet_put_int(c->remote_id); |
272 | packet_send(); | 272 | packet_send(); |
@@ -516,7 +516,7 @@ chan_init(void) | |||
516 | static void | 516 | static void |
517 | chan_shutdown_write(Channel *c) | 517 | chan_shutdown_write(Channel *c) |
518 | { | 518 | { |
519 | buffer_consume(&c->output, buffer_len(&c->output)); | 519 | buffer_clear(&c->output); |
520 | if (compat20 && c->type == SSH_CHANNEL_LARVAL) | 520 | if (compat20 && c->type == SSH_CHANNEL_LARVAL) |
521 | return; | 521 | return; |
522 | /* shutdown failure is allowed if write failed already */ | 522 | /* shutdown failure is allowed if write failed already */ |