Clear pollin flag when input buffer is flushed

The pollin flag must be cleared when the input buffer (pty slave) is
flushed. This ensures that the POLLIN event is not signaled to the application,
when there is not data to read.
This commit is contained in:
Frank Rolsted Jensen
2021-10-27 15:44:09 +02:00
committed by Kim Woelders
parent 6bf10a6901
commit 90c5387613
+2
View File
@@ -926,6 +926,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
case TCIFLUSH:
byte = 1;
tty->slave_suspended = 0; /* Re-enable polling of Slave */
tty->pollin = 0;
break;
case TCOFLUSH:
byte = 2;
@@ -935,6 +936,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
byte = 3;
tty->slave_suspended = 0; /* Re-enable polling of Slave */
tty->pollout = 1;
tty->pollin = 0;
break;
}
telnet_rfc2217_cfg(tty->tn, TNS_SET_PURGE, &byte, 1);