summaryrefslogtreecommitdiff
path: root/nchan.c
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 /nchan.c
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@
Diffstat (limited to 'nchan.c')
-rw-r--r--nchan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nchan.c b/nchan.c
index 070f14a7..fc8e7f18 100644
--- a/nchan.c
+++ b/nchan.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: nchan.c,v 1.43 2002/01/14 13:57:03 markus Exp $");
+RCSID("$OpenBSD: nchan.c,v 1.44 2002/01/21 23:27:10 markus Exp $");
#include "ssh1.h"
#include "ssh2.h"
@@ -364,6 +364,9 @@ chan_rcvd_ieof(Channel *c)
chan_rcvd_eof2(c);
else
chan_rcvd_ieof1(c);
+ if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN &&
+ buffer_len(&c->output) == 0)
+ chan_obuf_empty(c);
}
void
chan_rcvd_oclose(Channel *c)