Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Don't send any data upstream if we're not open yet.



details:   https://anonhg.NetBSD.org/src/rev/a83a619a2c91
branches:  trunk
changeset: 472143:a83a619a2c91
user:      pk <pk%NetBSD.org@localhost>
date:      Thu Apr 22 20:37:37 1999 +0000

description:
Don't send any data upstream if we're not open yet.

diffstat:

 sys/dev/ic/z8530tty.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 7a0f74868bbe -r a83a619a2c91 sys/dev/ic/z8530tty.c
--- a/sys/dev/ic/z8530tty.c     Thu Apr 22 20:06:02 1999 +0000
+++ b/sys/dev/ic/z8530tty.c     Thu Apr 22 20:37:37 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: z8530tty.c,v 1.59 1999/03/27 01:22:36 wrstuden Exp $   */
+/*     $NetBSD: z8530tty.c,v 1.60 1999/04/22 20:37:37 pk Exp $ */
 
 /*-
  * Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999
@@ -1579,6 +1579,13 @@
                        timeout(zstty_diag, zst, 60 * hz);
        }
 
+       /* If not yet open, drop the entire buffer content here */
+       if (!ISSET(tp->t_state, TS_ISOPEN)) {
+               get += cc << 1;
+               if (get >= end)
+                       get -= zstty_rbuf_size << 1;
+               cc = 0;
+       }
        while (cc) {
                code = get[0];
                rr1 = get[1];



Home | Main Index | Thread Index | Old Index