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:
Uwe Hermann 2013-11-19 23:22:46 +01:00
parent 1a54044299
commit 4403c39fe4
1 changed files with 1 additions and 1 deletions

View File

@ -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;