if (c->istate == CHAN_INPUT_OPEN &&
if (c->rfd != -1 &&
channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset){	char buf[16*1024];	int len;	if (c->istate == CHAN_INPUT_OPEN &&	    FD_ISSET(c->rfd, readset)) {		len = read(c->rfd, buf, sizeof(buf));		if (len < 0 && (errno == EINTR || errno == EAGAIN))			return 1;		if (len <= 0) {			debug("channel %d: read<=0 rfd %d len %d",			    c->self, c->rfd, len);			if (c->type != SSH_CHANNEL_OPEN) {				debug("channel %d: not open", c->self);				chan_mark_dead(c);				return -1;			} else if (compat13) {				buffer_consume(&c->output, buffer_len(&c->output));				c->type = SSH_CHANNEL_INPUT_DRAINING;				debug("channel %d: status set to input draining.", c->self);			} else {				chan_read_failed(c);			}			return -1;		}		if(c->input_filter != NULL) {			if (c->input_filter(c, buf, len) == -1) {				debug("channel %d: filter stops", c->self);				chan_read_failed(c);			}		} else {			buffer_append(&c->input, buf, len);		}	}	return 1;}