summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/nchan.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-05-08 17:44:55 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-05-08 17:44:55 +0000
commit18477e79ebd8b789a3f348b1b38cd76d15f0d2a8 (patch)
treee552bf2d919adbdfd32077f0802d2e61f7be78fb /usr.bin/ssh/nchan.c
parent882b0bdbdbe0a44a876dda1854d8346ba651208f (diff)
no drain if ibuf_empty, fixes x11fwd problems; tests by fries@
Diffstat (limited to 'usr.bin/ssh/nchan.c')
-rw-r--r--usr.bin/ssh/nchan.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/nchan.c b/usr.bin/ssh/nchan.c
index 383db290fe9..fd92fe8f653 100644
--- a/usr.bin/ssh/nchan.c
+++ b/usr.bin/ssh/nchan.c
@@ -28,7 +28,7 @@
*/
#include "includes.h"
-RCSID("$Id: nchan.c,v 1.16 2000/05/03 10:19:18 markus Exp $");
+RCSID("$Id: nchan.c,v 1.17 2000/05/08 17:44:54 markus Exp $");
#include "ssh.h"
@@ -107,6 +107,10 @@ chan_read_failed_12(Channel *c)
debug("channel %d: input open -> drain", c->self);
chan_shutdown_read(c);
c->istate = CHAN_INPUT_WAIT_DRAIN;
+ if (buffer_len(&c->input) == 0) {
+ debug("channel %d: input: no drain shortcut", c->self);
+ chan_ibuf_empty(c);
+ }
break;
default:
error("channel %d: internal error: we do not read, but chan_read_failed for istate %d",