diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-01-30 12:22:23 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-01-30 12:22:23 +0000 |
commit | 65a2448722c7b3955a92f4261824bd40f380c896 (patch) | |
tree | 8912cd1e905fba3e77dacd06f6f39c03d5afe867 /usr.bin/ssh | |
parent | 2493df84b2a2dbd0fe3e80bc1d25d14e827f3177 (diff) |
mark channel as write failed or dead instead of read failed on error
of the channel output filter.
ok markus@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/channels.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index 778ddec23e7..b7e185633ab 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/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" @@ -1465,7 +1465,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); |