bug 9986

Tom Brus tombrus at gmail.com
Thu Oct 25 15:41:58 CDT 2007


>From 716b438e20929d394857ed6143734126062f99be Mon Sep 17 00:00:00 2001
From: Tom Brus <tombrus at gmail.com>
Date: Thu, 25 Oct 2007 22:34:58 +0200
Subject: Exchanged interpretation of XON and XOFF.
See bug 9986. Tom Brus: tombrus at gmail.com
---
 dlls/ntdll/serial.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c
index bd6f9ca..be398a5 100644
--- a/dlls/ntdll/serial.c
+++ b/dlls/ntdll/serial.c
@@ -227,9 +227,9 @@ static NTSTATUS get_hand_flow(int fd,
SERIAL_HANDFLOW* shf)
 #endif
             shf->ControlHandShake |= SERIAL_RTS_CONTROL;
     }
-    if (port.c_iflag & IXON)
-        shf->FlowReplace |= SERIAL_AUTO_RECEIVE;
     if (port.c_iflag & IXOFF)
+        shf->FlowReplace |= SERIAL_AUTO_RECEIVE;
+    if (port.c_iflag & IXON)
         shf->FlowReplace |= SERIAL_AUTO_TRANSMIT;
 
     shf->XonLimit = 10;
@@ -611,13 +611,13 @@ static NTSTATUS set_handflow(int fd, const
SERIAL_HANDFLOW* shf)
 #endif
 
     if (shf->FlowReplace & SERIAL_AUTO_RECEIVE)
-        port.c_iflag |= IXON;
-    else
-        port.c_iflag &= ~IXON;
-    if (shf->FlowReplace & SERIAL_AUTO_TRANSMIT)
         port.c_iflag |= IXOFF;
     else
         port.c_iflag &= ~IXOFF;
+    if (shf->FlowReplace & SERIAL_AUTO_TRANSMIT)
+        port.c_iflag |= IXON;
+    else
+        port.c_iflag &= ~IXON;
     if (tcsetattr(fd, TCSANOW, &port) == -1)
     {
         ERR("tcsetattr error '%s'\n", strerror(errno));
-- 
1.5.2.5





More information about the wine-patches mailing list