From: Uwe Hermann Date: Sun, 13 Sep 2015 21:47:16 +0000 (+0200) Subject: mic-985xx: Fix blocking serial write timeout. X-Git-Tag: libsigrok-0.4.0~295 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5360d6d70684bc4e3ed4bbe31c842242b9d32761;p=libsigrok.git mic-985xx: Fix blocking serial write timeout. This fixes bug #433. --- diff --git a/src/hardware/mic-985xx/protocol.c b/src/hardware/mic-985xx/protocol.c index 9e3d9863..d7c69d0e 100644 --- a/src/hardware/mic-985xx/protocol.c +++ b/src/hardware/mic-985xx/protocol.c @@ -25,7 +25,8 @@ static int mic_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; }