summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/channels.c10
-rw-r--r--usr.bin/ssh/nchan.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 0ce651de21d..537b90ff283 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.157 2002/01/09 17:16:00 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.158 2002/01/09 17:26:35 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1270,7 +1270,7 @@ channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset)
chan_mark_dead(c);
return -1;
} else if (compat13) {
- buffer_consume(&c->output, buffer_len(&c->output));
+ buffer_clear(&c->output);
c->type = SSH_CHANNEL_INPUT_DRAINING;
debug("channel %d: input draining.", c->self);
} else {
@@ -1312,7 +1312,7 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset)
chan_mark_dead(c);
return -1;
} else if (compat13) {
- buffer_consume(&c->output, buffer_len(&c->output));
+ buffer_clear(&c->output);
debug("channel %d: input draining.", c->self);
c->type = SSH_CHANNEL_INPUT_DRAINING;
} else {
@@ -1425,7 +1425,7 @@ channel_post_output_drain_13(Channel *c, fd_set * readset, fd_set * writeset)
len = write(c->sock, buffer_ptr(&c->output),
buffer_len(&c->output));
if (len <= 0)
- buffer_consume(&c->output, buffer_len(&c->output));
+ buffer_clear(&c->output);
else
buffer_consume(&c->output, len);
}
@@ -1828,7 +1828,7 @@ channel_input_close(int type, u_int32_t seq, void *ctxt)
* Not a closed channel - mark it as draining, which will
* cause it to be freed later.
*/
- buffer_consume(&c->input, buffer_len(&c->input));
+ buffer_clear(&c->input);
c->type = SSH_CHANNEL_OUTPUT_DRAINING;
}
}
diff --git a/usr.bin/ssh/nchan.c b/usr.bin/ssh/nchan.c
index ff7d9598771..002321eb0ab 100644
--- a/usr.bin/ssh/nchan.c
+++ b/usr.bin/ssh/nchan.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: nchan.c,v 1.33 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: nchan.c,v 1.34 2002/01/09 17:26:35 markus Exp $");
#include "ssh1.h"
#include "ssh2.h"
@@ -266,7 +266,7 @@ chan_send_oclose1(Channel *c)
case CHAN_OUTPUT_OPEN:
case CHAN_OUTPUT_WAIT_DRAIN:
chan_shutdown_write(c);
- buffer_consume(&c->output, buffer_len(&c->output));
+ buffer_clear(&c->output);
packet_start(SSH_MSG_CHANNEL_OUTPUT_CLOSE);
packet_put_int(c->remote_id);
packet_send();
@@ -516,7 +516,7 @@ chan_init(void)
static void
chan_shutdown_write(Channel *c)
{
- buffer_consume(&c->output, buffer_len(&c->output));
+ buffer_clear(&c->output);
if (compat20 && c->type == SSH_CHANNEL_LARVAL)
return;
/* shutdown failure is allowed if write failed already */