diff options
author | Damien Miller <djm@mindrot.org> | 2006-01-31 11:47:15 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2006-01-31 11:47:15 +0100 |
commit | e204f6aa0dc399dfb709f3def13b9c4f8ab35357 (patch) | |
tree | 1a0249ed6991c566531011dc3857bd70742059c8 /channels.c | |
parent | - jmc@cvs.openbsd.org 2006/01/26 08:47:56 (diff) | |
download | openssh-e204f6aa0dc399dfb709f3def13b9c4f8ab35357.tar.xz openssh-e204f6aa0dc399dfb709f3def13b9c4f8ab35357.zip |
- reyk@cvs.openbsd.org 2006/01/30 12:22:22
[channels.c]
mark channel as write failed or dead instead of read failed on error
of the channel output filter.
ok markus@
Diffstat (limited to '')
-rw-r--r-- | channels.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/channels.c b/channels.c index 5fa80fbad..1252f3446 100644 --- a/channels.c +++ b/channels.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: channels.c,v 1.231 2005/12/30 15:56:36 reyk Exp $"); +RCSID("$OpenBSD: channels.c,v 1.232 2006/01/30 12:22:22 reyk Exp $"); #include "ssh.h" #include "ssh1.h" @@ -1466,7 +1466,11 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset) if (c->output_filter != NULL) { if ((buf = c->output_filter(c, &data, &dlen)) == NULL) { debug2("channel %d: filter stops", c->self); - chan_read_failed(c); + if (c->type != SSH_CHANNEL_OPEN) + chan_mark_dead(c); + else + chan_write_failed(c); + return -1; } } else if (c->datagram) { buf = data = buffer_get_string(&c->output, &dlen); |