2008-04-05 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Mon, 5 May 2008 21:48:20 +0000 (21:48 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Mon, 5 May 2008 21:48:20 +0000 (21:48 -0000)
* serial.c (set_attributes): When setting parity to Even,
besides removing the PARODD bit, add the PARENB bit to actually
use even parity.
Patch by Leszek Ciesielski.
Fixes #365248.

svn path=/trunk/mono/; revision=102565

support/ChangeLog
support/serial.c

index 424d27243fadc62470a9b0197a6453877ab82cbb..513601a2c69d9a8ca59b2b45d0930815b027db53 100644 (file)
@@ -1,3 +1,11 @@
+2008-04-05  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * serial.c (set_attributes): When setting parity to Even,
+       besides removing the PARODD bit, add the PARENB bit to actually
+       use even parity.
+       Patch by Leszek Ciesielski.
+       Fixes #365248.
+
 2008-03-31  Miguel de Icaza  <miguel@novell.com>
 
        * serial.c (write_serial): Avoid infinite loops, see #375580.
index ed6cd47947c4f2f2ec7226d90dbcef2cb5a323ce..492e771af1200da09ebdbf1f16e63c2481e4ebcb 100644 (file)
@@ -269,6 +269,7 @@ set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStop
            
        case Even: /* Even */
            newtio.c_cflag &= ~(PARODD);
+           newtio.c_cflag |= (PARENB);
            break;
            
        case Mark: /* Mark */