]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2002/01/09 17:26:35
authordjm <djm>
Tue, 22 Jan 2002 12:21:15 +0000 (12:21 +0000)
committerdjm <djm>
Tue, 22 Jan 2002 12:21:15 +0000 (12:21 +0000)
     [channels.c nchan.c]
     replace buffer_consume(b, buffer_len(b)) with buffer_clear(b); ok provos@

ChangeLog
channels.c
nchan.c

index a66a04d1eb7270c738149b26558a648845c53c8f..2b514d7e6a7add0b8ea21544a8f86d55ce7a2699 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - markus@cvs.openbsd.org 2002/01/09 17:16:00
      [channels.c]
      merge channel_pre_open_15/channel_pre_open_20; ok provos@
+   - markus@cvs.openbsd.org 2002/01/09 17:26:35
+     [channels.c nchan.c]
+     replace buffer_consume(b, buffer_len(b)) with buffer_clear(b); 
+     ok provos@
 
 
 20020121
index a053b0337db92c32ef3b0788ca631a3bd04cebf2..db3bda66a37ad90e72519e5cfb78243c2e5301a7 100644 (file)
@@ -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/nchan.c b/nchan.c
index ae5fb4aa395f2eb13c50ea8f20244054d6c9f119..ae1fe47cc3e98f44c205e468ef523e1603c3b12f 100644 (file)
--- a/nchan.c
+++ b/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 */
This page took 0.047582 seconds and 5 git commands to generate.