summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:34:52 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:34:52 +1100
commit73f1074272add17aeaaff10c5ec6ab310e513d9d (patch)
tree7e1cb3b483b9cf7e7e109461733a9ddc4a7f6aaa
parent914bef437e7b80da027116e140e41746dafc45ee (diff)
- markus@cvs.openbsd.org 2002/01/21 23:27:10
[channels.c nchan.c] cleanup channels faster if the are empty and we are in drain-state; ok deraadt@
-rw-r--r--ChangeLog6
-rw-r--r--channels.c4
-rw-r--r--nchan.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a35c4e287..6fe6d181e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -219,6 +219,10 @@
219 [cipher.c compat.c myproposal.h] 219 [cipher.c compat.c myproposal.h]
220 remove "rijndael-*", just use "aes-" since this how rijndael is called 220 remove "rijndael-*", just use "aes-" since this how rijndael is called
221 in the drafts; ok stevesk@ 221 in the drafts; ok stevesk@
222 - markus@cvs.openbsd.org 2002/01/21 23:27:10
223 [channels.c nchan.c]
224 cleanup channels faster if the are empty and we are in drain-state;
225 ok deraadt@
222 226
22320020121 22720020121
224 - (djm) Rework ssh-rand-helper: 228 - (djm) Rework ssh-rand-helper:
@@ -7366,4 +7370,4 @@
7366 - Wrote replacements for strlcpy and mkdtemp 7370 - Wrote replacements for strlcpy and mkdtemp
7367 - Released 1.0pre1 7371 - Released 1.0pre1
7368 7372
7369$Id: ChangeLog,v 1.1784 2002/01/22 12:34:35 djm Exp $ 7373$Id: ChangeLog,v 1.1785 2002/01/22 12:34:52 djm Exp $
diff --git a/channels.c b/channels.c
index 03f12d396..73bc10a1a 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.160 2002/01/16 13:17:51 markus Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.161 2002/01/21 23:27:10 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -1793,6 +1793,8 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
1793 if (c->force_drain && c->istate == CHAN_INPUT_OPEN) { 1793 if (c->force_drain && c->istate == CHAN_INPUT_OPEN) {
1794 debug("channel %d: FORCE input drain", c->self); 1794 debug("channel %d: FORCE input drain", c->self);
1795 c->istate = CHAN_INPUT_WAIT_DRAIN; 1795 c->istate = CHAN_INPUT_WAIT_DRAIN;
1796 if (buffer_len(&c->input) == 0)
1797 chan_ibuf_empty(c);
1796 } 1798 }
1797 1799
1798} 1800}
diff --git a/nchan.c b/nchan.c
index 070f14a7a..fc8e7f18d 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.43 2002/01/14 13:57:03 markus Exp $"); 26RCSID("$OpenBSD: nchan.c,v 1.44 2002/01/21 23:27:10 markus Exp $");
27 27
28#include "ssh1.h" 28#include "ssh1.h"
29#include "ssh2.h" 29#include "ssh2.h"
@@ -364,6 +364,9 @@ chan_rcvd_ieof(Channel *c)
364 chan_rcvd_eof2(c); 364 chan_rcvd_eof2(c);
365 else 365 else
366 chan_rcvd_ieof1(c); 366 chan_rcvd_ieof1(c);
367 if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN &&
368 buffer_len(&c->output) == 0)
369 chan_obuf_empty(c);
367} 370}
368void 371void
369chan_rcvd_oclose(Channel *c) 372chan_rcvd_oclose(Channel *c)