]> sigrok.org Git - libsigrok.git/commitdiff
motech-lps-30x: Fix blocking serial write timeout.
authorUwe Hermann <redacted>
Sun, 13 Sep 2015 22:01:18 +0000 (00:01 +0200)
committerUwe Hermann <redacted>
Sun, 13 Sep 2015 22:10:25 +0000 (00:10 +0200)
This fixes bug #438.

src/hardware/motech-lps-30x/api.c

index 83fbcd2cbcbd0a77b0ffe41a26749511795ec5f5..0ecfcb09e315e4f35394de42d2d08fbeee729f11 100644 (file)
@@ -151,7 +151,8 @@ SR_PRIV int lps_send_va(struct sr_serial_dev_inst *serial, const char *fmt, va_l
 
        sr_spew("lps_send_va: \"%s\"", buf);
 
-       retc = serial_write_blocking(serial, buf, strlen(buf), 0);
+       retc = serial_write_blocking(serial, buf, strlen(buf),
+                       serial_timeout(serial, strlen(buf)));
 
        if (retc < 0)
                return SR_ERR;