summaryrefslogtreecommitdiff
path: root/nchan.c
diff options
context:
space:
mode:
Diffstat (limited to 'nchan.c')
-rw-r--r--nchan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nchan.c b/nchan.c
index ae5fb4aa3..ae1fe47cc 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.33 2001/12/19 07:18:56 deraadt Exp $"); 26RCSID("$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)
516static void 516static void
517chan_shutdown_write(Channel *c) 517chan_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 */