From 7dc843ca9203338d5671c887b318aa4f426f6fc0 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 22 Aug 2008 05:15:52 +0000 Subject: [PATCH] Prevent VSTART flooding when turning on software flow control. It turned out we transmitted VSTART after each successful read on a TTY when software flow control was turned on. This was because of a very evil bug where we tested the TF_HIWAT_IN flag the other way around. Reported by: Christian Weisgerber --- sys/kern/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index af12da34f7ea..aaa43fc5597c 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1651,7 +1651,7 @@ void tty_hiwat_in_unblock(struct tty *tp) { - if ((tp->t_flags & TF_HIWAT_IN) == 0 && + if (tp->t_flags & TF_HIWAT_IN && tp->t_termios.c_iflag & IXOFF && tp->t_termios.c_cc[VSTART] != _POSIX_VDISABLE) { /*