]> 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 68b9f0c4a64d2e3acd614e7f555bad0546ae08ae..ba7828527fc74afd3a96517ce2a9bd820707ad58 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
  *
  * Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
  *
@@ -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;