From: Uwe Hermann Date: Sun, 13 Sep 2015 21:48:09 +0000 (+0200) Subject: center-3xx: Fix blocking serial write timeout. X-Git-Tag: libsigrok-0.4.0~294 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=84d328ac9810d4b210ef1b0fd04c7f47bde1f928;p=libsigrok.git center-3xx: Fix blocking serial write timeout. This fixes bug #428. --- diff --git a/src/hardware/center-3xx/protocol.c b/src/hardware/center-3xx/protocol.c index bd00e77a..f22dd4d9 100644 --- a/src/hardware/center-3xx/protocol.c +++ b/src/hardware/center-3xx/protocol.c @@ -34,7 +34,8 @@ static int center_send(struct sr_serial_dev_inst *serial, const char *cmd) { int ret; - if ((ret = serial_write_blocking(serial, cmd, strlen(cmd), 0)) < 0) { + if ((ret = serial_write_blocking(serial, cmd, strlen(cmd), + serial_timeout(serial, strlen(cmd)))) < 0) { sr_err("Error sending '%s' command: %d.", cmd, ret); return SR_ERR; }