]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-linux.c
flush queue before restoring line discipline to try to
[ppp.git] / pppd / sys-linux.c
index 33e338d29a46546b761e9e9ea7adf3f4ebc2c9a7..c63ac9a5d9a0cf8a9918b1941b5f6f653adaea39 100644 (file)
@@ -388,6 +388,7 @@ void disestablish_ppp(int tty_fd)
 /*
  * Restore the previous line discipline
  */
+       tcflush(tty_fd, TCIOFLUSH);
        if (ioctl(tty_fd, TIOCSETD, &tty_disc) < 0) {
            if ( ! ok_error (errno))
                error("ioctl(TIOCSETD, N_TTY): %m");