Skip to content

Commit b274f6c

Browse files
committed
ols: Clean up: Always keep sample_buf_size up to date
1 parent 8360afa commit b274f6c

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
@@ -402,7 +402,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
402402
return SR_ERR;
403403

404404
/* Reset all operational states. */
405-
devc->rle_count = devc->sample_buf_size = 0;
405+
devc->rle_count = 0;
406406
devc->cnt_samples = devc->raw_sample_size = 0;
407407
devc->cnt_rx_bytes = devc->cnt_rx_raw_samples = 0;
408408
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
@@ -543,6 +543,7 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data)
543543

544544
g_free(devc->sample_buf);
545545
devc->sample_buf = 0;
546+
devc->sample_buf_size = 0;
546547

547548
serial_flush(serial);
548549
abort_acquisition(sdi);

0 commit comments

Comments
 (0)