diff options
author | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2006-03-09 11:42:07 +0300 |
---|---|---|
committer | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2006-03-09 11:42:07 +0300 |
commit | 69e2fc6b7fab1f7f11e1668b013f91f9a6656b4c (patch) | |
tree | 9fb911954f99c7455df136c28bee12a43e411800 /support | |
parent | d49f2b2582027ba186268c9cd824f798e10124aa (diff) |
2006-03-09 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* serial.c: Fix a pair of wrong or incomplete assignations
in set_attributes.
svn path=/trunk/mono/; revision=57714
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 5 | ||||
-rw-r--r-- | support/serial.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index 6423a9952a8..b2e2fb6f95a 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,8 @@ +2006-03-09 Carlos Alberto Cortez <calberto.cortez@gmail.com> + + * serial.c: Fix a pair of wrong or incomplete assignations + in set_attributes. + 2006-02-28 Carlos Alberto Cortez <calberto.cortez@gmail.com> * serial.h: New file with serial port constants. diff --git a/support/serial.c b/support/serial.c index e73e6f65591..bd2fbd57e59 100644 --- a/support/serial.c +++ b/support/serial.c @@ -132,7 +132,7 @@ set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStop newtio.c_cflag |= PARENB | PARODD; break; case Even: /* Even */ - newtio.c_iflag &= ~IGNPAR; + newtio.c_iflag &= ~(IGNPAR | PARODD); newtio.c_cflag |= PARENB; break; case Mark: /* Mark */ @@ -179,10 +179,6 @@ set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStop case NoneHandshake: /* None */ /* do nothing */ break; - case XOnXOff: /* XOnXOff */ - newtio.c_iflag |= IXOFF; - // newtio.c_oflag |= IXON; - break; case RequestToSend: /* RequestToSend (RTS) */ #ifdef CRTSCTS newtio.c_cflag |= CRTSCTS; @@ -193,6 +189,10 @@ set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStop newtio.c_cflag |= CRTSCTS; #endif /* def CRTSCTS */ /* fall through */ + case XOnXOff: /* XOnXOff */ + newtio.c_iflag |= IXOFF; + // newtio.c_oflag |= IXON; + break; } if (cfsetospeed (&newtio, baud_rate) < 0 || cfsetispeed (&newtio, baud_rate) < 0 || |