public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: serial: Fix a copy-paste error in DTR setup
Date: Tue, 29 Nov 2022 12:54:37 +0000 (GMT)	[thread overview]
Message-ID: <20221129125437.4CDAE3858D1E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a263fe0b268580273c1adc4b1bad256147990222

commit a263fe0b268580273c1adc4b1bad256147990222
Author: Carlo Bramini <30959007+carlo-bramini@users.noreply.github.com>
Date:   Tue Nov 29 10:02:43 2022 +0100

    Cygwin: serial: Fix a copy-paste error in DTR setup
    
    In commit 2dab880c963ce0204c3513d664f610b587a3e6a6 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: 2dab880c963c ("Cygwin: fix TIOCMBIS/TIOCMBIC not working when using usbser.sys")

Diff:
---
 winsup/cygwin/fhandler/serial.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/fhandler/serial.cc b/winsup/cygwin/fhandler/serial.cc
index 58a8df677..e04f8f263 100644
--- a/winsup/cygwin/fhandler/serial.cc
+++ b/winsup/cygwin/fhandler/serial.cc
@@ -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))
         {

                 reply	other threads:[~2022-11-29 12:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221129125437.4CDAE3858D1E@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).