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.
This commit is contained in:
Martin Ling 2014-09-21 17:46:39 +01:00 committed by Uwe Hermann
parent d7b269da8f
commit 3582ce8a01
1 changed files with 1 additions and 1 deletions

View File

@ -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. */ /* Try to get as much data as the buffer can hold. */
len = SERIAL_BUFSIZE - devc->buflen; 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) { if (len < 1) {
sr_err("Serial port read error: %d.", len); sr_err("Serial port read error: %d.", len);
return FALSE; return FALSE;