ols: Always open serial port in nonblocking mode.
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.
This commit is contained in:
parent
1a54044299
commit
4403c39fe4
|
@ -209,7 +209,7 @@ static int dev_open(struct sr_dev_inst *sdi)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue