Skip to content

Commit 3a39f13

Browse files
committed
ols: Clean up: Always keep sample_buf_size up to date
1 parent 7fc0db4 commit 3a39f13

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/hardware/openbench-logic-sniffer/api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
409409
return SR_ERR;
410410

411411
/* Reset all operational states. */
412-
devc->rle_count = devc->sample_buf_size = 0;
412+
devc->rle_count = 0;
413413
devc->cnt_samples = devc->raw_sample_size = 0;
414414
devc->cnt_rx_bytes = devc->cnt_rx_raw_samples = 0;
415415
memset(devc->raw_sample, 0, 4);

src/hardware/openbench-logic-sniffer/protocol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data)
590590

591591
g_free(devc->sample_buf);
592592
devc->sample_buf = 0;
593+
devc->sample_buf_size = 0;
593594

594595
serial_flush(serial);
595596
abort_acquisition(sdi);

0 commit comments

Comments
 (0)