diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/channels.c b/channels.c index a053b0337..db3bda66a 100644 --- a/channels.c +++ b/channels.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.157 2002/01/09 17:16:00 markus Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.158 2002/01/09 17:26:35 markus Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -1270,7 +1270,7 @@ channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset) | |||
1270 | chan_mark_dead(c); | 1270 | chan_mark_dead(c); |
1271 | return -1; | 1271 | return -1; |
1272 | } else if (compat13) { | 1272 | } else if (compat13) { |
1273 | buffer_consume(&c->output, buffer_len(&c->output)); | 1273 | buffer_clear(&c->output); |
1274 | c->type = SSH_CHANNEL_INPUT_DRAINING; | 1274 | c->type = SSH_CHANNEL_INPUT_DRAINING; |
1275 | debug("channel %d: input draining.", c->self); | 1275 | debug("channel %d: input draining.", c->self); |
1276 | } else { | 1276 | } else { |
@@ -1312,7 +1312,7 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset) | |||
1312 | chan_mark_dead(c); | 1312 | chan_mark_dead(c); |
1313 | return -1; | 1313 | return -1; |
1314 | } else if (compat13) { | 1314 | } else if (compat13) { |
1315 | buffer_consume(&c->output, buffer_len(&c->output)); | 1315 | buffer_clear(&c->output); |
1316 | debug("channel %d: input draining.", c->self); | 1316 | debug("channel %d: input draining.", c->self); |
1317 | c->type = SSH_CHANNEL_INPUT_DRAINING; | 1317 | c->type = SSH_CHANNEL_INPUT_DRAINING; |
1318 | } else { | 1318 | } else { |
@@ -1425,7 +1425,7 @@ channel_post_output_drain_13(Channel *c, fd_set * readset, fd_set * writeset) | |||
1425 | len = write(c->sock, buffer_ptr(&c->output), | 1425 | len = write(c->sock, buffer_ptr(&c->output), |
1426 | buffer_len(&c->output)); | 1426 | buffer_len(&c->output)); |
1427 | if (len <= 0) | 1427 | if (len <= 0) |
1428 | buffer_consume(&c->output, buffer_len(&c->output)); | 1428 | buffer_clear(&c->output); |
1429 | else | 1429 | else |
1430 | buffer_consume(&c->output, len); | 1430 | buffer_consume(&c->output, len); |
1431 | } | 1431 | } |
@@ -1828,7 +1828,7 @@ channel_input_close(int type, u_int32_t seq, void *ctxt) | |||
1828 | * Not a closed channel - mark it as draining, which will | 1828 | * Not a closed channel - mark it as draining, which will |
1829 | * cause it to be freed later. | 1829 | * cause it to be freed later. |
1830 | */ | 1830 | */ |
1831 | buffer_consume(&c->input, buffer_len(&c->input)); | 1831 | buffer_clear(&c->input); |
1832 | c->type = SSH_CHANNEL_OUTPUT_DRAINING; | 1832 | c->type = SSH_CHANNEL_OUTPUT_DRAINING; |
1833 | } | 1833 | } |
1834 | } | 1834 | } |