]> sigrok.org Git - libsigrok.git/commitdiff
lecroy-xstream: Keep acquiring infinitely if no frame limit is set
authorSoeren Apel <redacted>
Sun, 3 Dec 2017 21:10:56 +0000 (22:10 +0100)
committerUwe Hermann <redacted>
Thu, 11 Jan 2018 01:21:50 +0000 (02:21 +0100)
src/hardware/lecroy-xstream/protocol.c

index 5fa1b44a63d3e64acdf18ef447ec8eeb68b1a08f..1cbf036e8f1c9689eae9e30c4b9a8b06e4623789 100644 (file)
@@ -717,7 +717,8 @@ SR_PRIV int lecroy_xstream_receive_data(int fd, int revents, void *cb_data)
         * number of frames, or continue reception by starting over at
         * the first enabled channel.
         */
-       if (++devc->num_frames == devc->frame_limit) {
+       devc->num_frames++;
+       if (devc->frame_limit && (devc->num_frames == devc->frame_limit)) {
                sr_dev_acquisition_stop(sdi);
        } else {
                devc->current_channel = devc->enabled_channels;