1 Commits

Author SHA1 Message Date
Frank Rolsted Jensen eaf30f067c 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.
2021-10-27 15:44:09 +02:00
3 changed files with 7 additions and 16 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
m4_define([pkg_version], [0.15])
m4_define([pkg_version], [0.14])
#m4_define([pkg_revision], [005])
m4_define([pkg_version], m4_ifdef([pkg_revision], [pkg_version.pkg_revision], [pkg_version]))
+1 -2
View File
@@ -60,12 +60,11 @@ extern void telnet_rfc2217_ctl(tn_ctx_t * tcc, unsigned int val);
/*RFC2217 control commands*/
#define TNS_CTL_NOFLOW 1
#define TNS_CTL_XONOFF_OUT 2
#define TNS_CTL_XONOFF 2
#define TNS_CTL_CTSRTS 3
#define TNS_CTL_DTR_ON 8
#define TNS_CTL_DTR_OFF 9
#define TNS_CTL_RTS_ON 11
#define TNS_CTL_RTS_OFF 12
#define TNS_CTL_XONOFF_IN 15
#endif /*TELNET_H */
+5 -13
View File
@@ -855,14 +855,6 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
tty->master_suspended = (tty->smcr & TIOCM_CTS) ? 0 : 1;
telnet_rfc2217_ctl(tty->tn, TNS_CTL_CTSRTS);
}
else if (tio->c_iflag & (IXON | IXOFF))
{
tty->master_suspended = 0;
if (tio->c_iflag & IXON)
telnet_rfc2217_ctl(tty->tn, TNS_CTL_XONOFF_OUT);
if (tio->c_iflag & IXOFF)
telnet_rfc2217_ctl(tty->tn, TNS_CTL_XONOFF_IN);
}
else
{
tty->master_suspended = 0;
@@ -952,7 +944,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
break;
case TIOCMBIS:
CHECK_BUF_IN(sizeof(int));
tiocm = *(const unsigned int *)in_buf;
tiocm = *(unsigned int *)in_buf;
fuse_reply_ioctl(req, 0, 0, 0);
DBG("%s: cmd=%s tiocm=%#x\n", __func__, _ioctl_name(cmd), tiocm);
if (tiocm & TIOCM_RTS)
@@ -968,7 +960,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
goto show_mctl;
case TIOCMBIC:
CHECK_BUF_IN(sizeof(int));
tiocm = *(const unsigned int *)in_buf;
tiocm = *(unsigned int *)in_buf;
fuse_reply_ioctl(req, 0, 0, 0);
DBG("%s: cmd=%s tiocm=%#x\n", __func__, _ioctl_name(cmd), tiocm);
if (tiocm & TIOCM_RTS)
@@ -984,7 +976,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
goto show_mctl;
case TIOCMSET:
CHECK_BUF_IN(sizeof(int));
tiocm = *(const unsigned int *)in_buf;
tiocm = *(unsigned int *)in_buf;
fuse_reply_ioctl(req, 0, 0, 0);
DBG("%s: cmd=%s tiocm=%#x\n", __func__, _ioctl_name(cmd), tiocm);
tty->cmcr &= ~(TIOCM_RTS | TIOCM_DTR);
@@ -1014,7 +1006,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
break;
case TIOCSWINSZ:
CHECK_BUF_IN(sizeof(struct winsize));
ws = *(const struct winsize *)in_buf;
ws = *(struct winsize *)in_buf;
res = ioctl(tty->fds[FD_SLAVE].fd, TIOCSWINSZ, &ws);
if (res < 0)
{
@@ -1038,7 +1030,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
break;
case TIOCSETD:
CHECK_BUF_IN(sizeof(int));
val = *(const int *)in_buf;
val = *(int *)in_buf;
res = ioctl(tty->fds[FD_SLAVE].fd, TIOCSETD, &val);
if (res < 0)
fuse_reply_err(req, errno);