]> sigrok.org Git - libsigrok.git/commitdiff
center-3xx: Fix blocking serial write timeout.
authorUwe Hermann <redacted>
Sun, 13 Sep 2015 21:48:09 +0000 (23:48 +0200)
committerUwe Hermann <redacted>
Sun, 13 Sep 2015 21:48:09 +0000 (23:48 +0200)
This fixes bug #428.

src/hardware/center-3xx/protocol.c

index bd00e77aea65c1833a0730bfa09ab386d5b523be..f22dd4d9e461da2865cf4b886a2fb5f28c751de4 100644 (file)
@@ -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;
        }