]> sigrok.org Git - libsigrok.git/blobdiff - hardware/openbench-logic-sniffer/protocol.c
Bump package version to 0.2.1, libtool version to 1:1:0.
[libsigrok.git] / hardware / openbench-logic-sniffer / protocol.c
index 45e2058518103d8891bbb089aa0aa2d9c9d83f8d..ba7828527fc74afd3a96517ce2a9bd820707ad58 100644 (file)
@@ -383,7 +383,7 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data)
                        num_channels++;
        }
 
-       if (revents == G_IO_IN) {
+       if (revents == G_IO_IN && devc->num_samples < devc->limit_samples) {
                if (serial_read(serial, &byte, 1) != 1)
                        return FALSE;
 
@@ -508,7 +508,6 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data)
 
                serial_flush(serial);
                abort_acquisition(sdi);
-               serial_close(serial);
        }
 
        return TRUE;