]> sigrok.org Git - libsigrok.git/commitdiff
conrad-digi-35-cpu: Fix blocking serial write timeout.
authorUwe Hermann <redacted>
Sun, 13 Sep 2015 21:55:22 +0000 (23:55 +0200)
committerUwe Hermann <redacted>
Sun, 13 Sep 2015 21:55:22 +0000 (23:55 +0200)
This fixes bug #430.

src/hardware/conrad-digi-35-cpu/protocol.c

index 32702d8398fac5f0d40588fbbd716b2586858067..732bec62c7805169daaa74a840950c2dab01b626 100644 (file)
@@ -49,7 +49,8 @@ SR_PRIV int send_msg1(const struct sr_dev_inst *sdi, char cmd, int param)
 
        sr_spew("send_msg1(): %c%c%c%c\\r", buf[0], buf[1], buf[2], buf[3]);
 
-       if (serial_write_blocking(serial, buf, sizeof(buf), 0) < (int)sizeof(buf)) {
+       if (serial_write_blocking(serial, buf, sizeof(buf),
+                       serial_timeout(serial, sizeof(buf))) < (int)sizeof(buf)) {
                sr_err("Write error for cmd=%c", cmd);
                return SR_ERR;
        }