This call was already nonblocking due to the flag.
if (!(serial = sr_serial_dev_inst_new(conn, serialcomm)))
return NULL;
- if (serial_open(serial, SERIAL_RDONLY | SERIAL_NONBLOCK) != SR_OK)
+ if (serial_open(serial, SERIAL_RDONLY) != SR_OK)
return NULL;
sr_info("Probing serial port %s.", conn);
/* Try to get as much data as the buffer can hold. */
len = TELEINFO_BUF_SIZE - devc->buf_len;
- len = serial_read(serial, devc->buf + devc->buf_len, len);
+ len = serial_read_nonblocking(serial, devc->buf + devc->buf_len, len);
if (len < 1) {
sr_err("Serial port read error: %d.", len);
return FALSE;