=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/channels.c,v retrieving revision 1.231 retrieving revision 1.232 diff -u -r1.231 -r1.232 --- src/usr.bin/ssh/channels.c 2005/12/30 15:56:36 1.231 +++ src/usr.bin/ssh/channels.c 2006/01/30 12:22:22 1.232 @@ -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 @@ 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);