aboutsummaryrefslogtreecommitdiff
path: root/src/mm-serial-port.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-03-10 14:50:41 -0800
committerDan Williams <dcbw@redhat.com>2010-03-10 14:50:41 -0800
commit1979512d8dfb6428353e6bf358f908973a318095 (patch)
tree60f703f4a2c75c4e3a2d7d362969fd2c441ddb8c /src/mm-serial-port.c
parent8dde6bb8dd2c063f5740ae78b980343be8e5d669 (diff)
parentb7858ba235c046a514fbc79e18ac9faa75982032 (diff)
Merge remote branch 'origin/master' into qcdm
Diffstat (limited to 'src/mm-serial-port.c')
-rw-r--r--src/mm-serial-port.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
index a31e4299..8de0cdd1 100644
--- a/src/mm-serial-port.c
+++ b/src/mm-serial-port.c
@@ -321,8 +321,14 @@ real_config_fd (MMSerialPort *self, int fd, GError **error)
stbuf.c_cc[VTIME] = 0;
stbuf.c_cc[VEOF] = 1;
- stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
- stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits);
+ /* Use software handshaking */
+ stbuf.c_iflag |= (IXON | IXOFF | IXANY);
+
+ /* Set up port speed and serial attributes; also ignore modem control
+ * lines since most drivers don't implement RTS/CTS anyway.
+ */
+ stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | PARENB | CRTSCTS);
+ stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits | CLOCAL);
if (ioctl (fd, TCSETA, &stbuf) < 0) {
g_set_error (error,