summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2000-05-08 17:44:54 +0000
committermarkus <markus@openbsd.org>2000-05-08 17:44:54 +0000
commit1a965a3e97f2301beb4ac7f47d0122c252a1d328 (patch)
tree1224350fd48cf6cf07108374feea375f9e3dda78
parentsome markus certified spelling adjustments (diff)
downloadwireguard-openbsd-1a965a3e97f2301beb4ac7f47d0122c252a1d328.tar.xz
wireguard-openbsd-1a965a3e97f2301beb4ac7f47d0122c252a1d328.zip
no drain if ibuf_empty, fixes x11fwd problems; tests by fries@
-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",