diff --git a/src/hardware/siglent-sds/protocol.c b/src/hardware/siglent-sds/protocol.c index af2f2d9b..584e5330 100644 --- a/src/hardware/siglent-sds/protocol.c +++ b/src/hardware/siglent-sds/protocol.c @@ -544,7 +544,7 @@ SR_PRIV int siglent_sds_receive(int fd, int revents, void *cb_data) sdi->driver->dev_acquisition_stop(sdi); return TRUE; } - devc->num_block_bytes = len; + devc->num_block_bytes = 0; devc->num_block_read = 0; if (len == -1) { @@ -608,7 +608,7 @@ SR_PRIV int siglent_sds_receive(int fd, int revents, void *cb_data) g_array_free(data, TRUE); } len = 0; - if (devc->num_samples == (devc->num_block_bytes - SIGLENT_HEADER_SIZE)) { + if (devc->num_samples == devc->num_block_bytes) { sr_dbg("Transfer has been completed."); devc->num_header_bytes = 0; devc->num_block_bytes = 0;