View | Details | Raw Unified | Return to bug 1528 | Differences between
and this patch

Collapse All | Expand All

(-)openssh-5.1p1/channels.c (-1 / +8 lines)
Lines 237-245 Link Here
237
	c->efd = efd;
237
	c->efd = efd;
238
	c->extended_usage = extusage;
238
	c->extended_usage = extusage;
239
239
240
#if 0 
240
	if ((c->isatty = is_tty) != 0)
241
	if ((c->isatty = is_tty) != 0)
241
		debug2("channel %d: rfd %d isatty", c->self, c->rfd);
242
		debug2("channel %d: rfd %d isatty", c->self, c->rfd);
242
	c->wfd_isatty = is_tty || isatty(c->wfd);
243
	c->wfd_isatty = is_tty || isatty(c->wfd);
244
#else
245
	c->isatty = isatty(c->rfd);
246
	c->wfd_isatty = isatty(c->wfd);
247
	debug2("channel %d: rfd %d c->isatty %d", c->self, c->rfd, c->isatty );
248
	debug2("channel %d: wfd %d c->wfd_isatty %d", c->self, c->wfd, c->wfd_isatty );
249
#endif
243
250
244
	/* enable nonblocking mode */
251
	/* enable nonblocking mode */
245
	if (nonblock) {
252
	if (nonblock) {
Lines 1602-1608 Link Here
1602
			}
1609
			}
1603
			return -1;
1610
			return -1;
1604
		}
1611
		}
1605
		if (compat20 && c->isatty && dlen >= 1 && buf[0] != '\r') {
1612
		if (compat20 && c->wfd_isatty && dlen >= 1 && buf[0] != '\r') {
1606
			if (tcgetattr(c->wfd, &tio) == 0 &&
1613
			if (tcgetattr(c->wfd, &tio) == 0 &&
1607
			    !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) {
1614
			    !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) {
1608
				/*
1615
				/*

Return to bug 1528