X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fopenbench-logic-sniffer%2Fprotocol.c;h=ba7828527fc74afd3a96517ce2a9bd820707ad58;hb=refs%2Ftags%2Flibsigrok-0.2.1;hp=68b9f0c4a64d2e3acd614e7f555bad0546ae08ae;hpb=459a0f2623686472b134735ae37a52f0d61d715e;p=libsigrok.git diff --git a/hardware/openbench-logic-sniffer/protocol.c b/hardware/openbench-logic-sniffer/protocol.c index 68b9f0c4..ba782852 100644 --- a/hardware/openbench-logic-sniffer/protocol.c +++ b/hardware/openbench-logic-sniffer/protocol.c @@ -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 * @@ -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;