]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
IXON and IXOFF belong in _iflag_, not cflag! While I'm here, be more
authorSimon Tatham <anakin@pobox.com>
Mon, 2 Oct 2006 20:52:57 +0000 (20:52 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 2 Oct 2006 20:52:57 +0000 (20:52 +0000)
reliable in clearing of RTS/CTS flags.

[originally from svn r6864]

unix/uxser.c

index db98dd87c64a12c840d849e13b5ba739e7cd8850..463f4c43f7952d25a1bf29da5d7ab5f09fa1fc6a 100644 (file)
@@ -162,9 +162,15 @@ static const char *serial_configure(Serial serial, Config *cfg)
     logevent(serial->frontend, msg);
     sfree(msg);
 
-    options.c_cflag &= ~(IXON|IXOFF);
+    options.c_iflag &= ~(IXON|IXOFF);
+#ifdef CRTSCTS
+    options.c_cflag &= ~CRTSCTS;
+#endif
+#ifdef CNEW_RTSCTS
+    options.c_cflag &= ~CNEW_RTSCTS;
+#endif
     if (cfg->serflow == SER_FLOW_XONXOFF) {
-       options.c_cflag |= IXON | IXOFF;
+       options.c_iflag |= IXON | IXOFF;
        str = "XON/XOFF";
     } else if (cfg->serflow == SER_FLOW_RTSCTS) {
 #ifdef CRTSCTS