From e33e8dd4a86cd33fe28b83d7b83ac323d854106d Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 28 Feb 1995 23:21:33 +0000 Subject: Workaround IXOFF bug when output queue is full && RTS control is on --- sys/dev/sio/sio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/dev/sio/sio.c') diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index e5115e8..1d8bf01 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.68 1995/02/26 02:30:18 bde Exp $ + * $Id: sio.c,v 1.69 1995/02/28 00:20:54 pst Exp $ */ #include "sio.h" @@ -1531,12 +1531,16 @@ repeat: * Only have it in standard one now. */ && linesw[tp->t_line].l_rint == ttyinput) { + int queue_full = 0; + if ((tp->t_iflag & IXOFF) && tp->t_cc[VSTOP] != _POSIX_VDISABLE && - putc(tp->t_cc[VSTOP], &tp->t_outq) == 0 || + (queue_full = putc(tp->t_cc[VSTOP], &tp->t_outq)) == 0 || (com->state & CS_RTS_IFLOW)) { tp->t_state |= TS_TBLOCK; ttstart(tp); + if (queue_full) /* try again */ + tp->t_state &= ~TS_TBLOCK; } } /* -- cgit v1.1