- 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@
diff --git a/ChangeLog b/ChangeLog
index f38e515..879ac10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,11 @@
written with a lot of help from jakob;
feedback dtucker/markus;
ok markus
+ - 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@
20060129
- (dtucker) [configure.ac opensshd.init.in] Bug #1144: Use /bin/sh for the
@@ -3743,4 +3748,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.4098 2006/01/31 10:46:51 djm Exp $
+$Id: ChangeLog,v 1.4099 2006/01/31 10:47:15 djm Exp $
diff --git a/channels.c b/channels.c
index 5fa80fb..1252f34 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 @@
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);