]> sigrok.org Git - libsigrok.git/blobdiff - hardware/openbench-logic-sniffer/protocol.c
ols: Workaround for mac os X stray events
[libsigrok.git] / hardware / openbench-logic-sniffer / protocol.c
index 43f9f45cdb89a03920519822dc27ffcf67233601..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;