The scan() function was opening the port in non-blocking mode, the dev_open()
function however was not using the SERIAL_NONBLOCK flag. This led to hangs
in certain situations.
This fixes the OLS e.g. on NetBSD.
struct sr_serial_dev_inst *serial;
serial = sdi->conn;
struct sr_serial_dev_inst *serial;
serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR) != SR_OK)
+ if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
return SR_ERR;
sdi->status = SR_ST_ACTIVE;
return SR_ERR;
sdi->status = SR_ST_ACTIVE;