Handle CRTSCTS properly
This commit is contained in:
committed by
Kim Woelders
parent
9db6c5d83c
commit
e51a98e4b2
+8
-2
@@ -400,7 +400,8 @@ static void _modem_status_cb(void *cctx, int status)
|
|||||||
if (status & TNS_STATE_CTS)
|
if (status & TNS_STATE_CTS)
|
||||||
mcr |= TIOCM_CTS;
|
mcr |= TIOCM_CTS;
|
||||||
|
|
||||||
tty->master_suspended = (mcr & TIOCM_CTS) ? 0 : 1;
|
if (tty->tio.c_cflag & CRTSCTS)
|
||||||
|
tty->master_suspended = (mcr & TIOCM_CTS) ? 0 : 1;
|
||||||
DBG("%s: tty=%p mcr=%x MS=%d\n", __func__, tty, mcr,
|
DBG("%s: tty=%p mcr=%x MS=%d\n", __func__, tty, mcr,
|
||||||
tty->master_suspended);
|
tty->master_suspended);
|
||||||
|
|
||||||
@@ -799,9 +800,14 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
|
|||||||
|
|
||||||
if (tio->c_cflag & CRTSCTS)
|
if (tio->c_cflag & CRTSCTS)
|
||||||
{
|
{
|
||||||
tty->cmcr |= TIOCM_RTS;
|
tty->master_suspended = (tty->smcr & TIOCM_CTS) ? 0 : 1;
|
||||||
telnet_rfc2217_ctl(tty->tn, TNS_CTL_CTSRTS);
|
telnet_rfc2217_ctl(tty->tn, TNS_CTL_CTSRTS);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tty->master_suspended = 0;
|
||||||
|
telnet_rfc2217_ctl(tty->tn, TNS_CTL_NOFLOW);
|
||||||
|
}
|
||||||
|
|
||||||
if (!(tty->cmcr & TIOCM_DTR) && _tio_baud(tio) != 0)
|
if (!(tty->cmcr & TIOCM_DTR) && _tio_baud(tio) != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user