]> sigrok.org Git - libsigrok.git/commitdiff
conrad-digi-35-cpu: Make serial write call block.
authorMartin Ling <redacted>
Sun, 21 Sep 2014 17:07:14 +0000 (18:07 +0100)
committerUwe Hermann <redacted>
Wed, 24 Sep 2014 21:30:01 +0000 (23:30 +0200)
This call was previously nonblocking, but there is no partial write handling.
It is only called from config_set so it is free to block.

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

index 7657b319bc2d59a4e2d4555203794689673a1e2f..cfabdc7b778a72c38397618e295cdec11587e633 100644 (file)
@@ -48,7 +48,7 @@ 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(serial, buf, sizeof(buf)) == -1) {
+       if (serial_write_blocking(serial, buf, sizeof(buf)) == -1) {
                sr_err("Write error for cmd=%c: %d %s", cmd, errno, strerror(errno));
                return SR_ERR;
        }