From: Martin Ling Date: Sun, 21 Sep 2014 16:46:39 +0000 (+0100) Subject: center-3xx: Mark serial read call as nonblocking. X-Git-Tag: libsigrok-0.4.0~968 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=3582ce8a01ef4f4befd3fccc28c5788196d48499;p=libsigrok.git center-3xx: Mark serial read call as nonblocking. This call was already nonblocking because the driver opens the port with the SERIAL_NONBLOCK flag. Partial reads are handled. --- diff --git a/src/hardware/center-3xx/protocol.c b/src/hardware/center-3xx/protocol.c index ef8b9dcd..16b23bda 100644 --- a/src/hardware/center-3xx/protocol.c +++ b/src/hardware/center-3xx/protocol.c @@ -170,7 +170,7 @@ static gboolean handle_new_data(struct sr_dev_inst *sdi, int idx) /* Try to get as much data as the buffer can hold. */ len = SERIAL_BUFSIZE - devc->buflen; - len = serial_read(serial, devc->buf + devc->buflen, len); + len = serial_read_nonblocking(serial, devc->buf + devc->buflen, len); if (len < 1) { sr_err("Serial port read error: %d.", len); return FALSE;