Cygwin: serial: Fix a copy-paste error in DTR setup

In commit 2dab880c96 I did a mistake when
I copied the new fhandler_serial::switch_modem_lines() from my modified
3.3.6 branch to the current master and I left a copy paste error. This
patch fixes that error.

Fixes: 2dab880c96 ("Cygwin: fix TIOCMBIS/TIOCMBIC not working when using usbser.sys")
This commit is contained in:
Carlo Bramini 2022-11-29 10:02:43 +01:00 committed by Corinna Vinschen
parent 17761a8ef4
commit a263fe0b26
1 changed files with 2 additions and 2 deletions

View File

@ -411,10 +411,10 @@ fhandler_serial::switch_modem_lines (int set, int clr)
dcb.fRtsControl = RTS_CONTROL_DISABLE;
if (set & TIOCM_DTR)
dcb.fRtsControl = DTR_CONTROL_ENABLE;
dcb.fDtrControl = DTR_CONTROL_ENABLE;
else
if (clr & TIOCM_DTR)
dcb.fRtsControl = DTR_CONTROL_DISABLE;
dcb.fDtrControl = DTR_CONTROL_DISABLE;
if (!SetCommState(get_handle(), &dcb))
{