]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fx2lafw/fx2lafw.c
sr: fx2lafw: Do not start a new acquisition if the old is still running
[libsigrok.git] / hardware / fx2lafw / fx2lafw.c
index 28866133962ec6d3eb5e3b7883d34b770068e95f..11e41fffe410f31c14af570948498b5f129c860a 100644 (file)
@@ -918,6 +918,10 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data)
        if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
                return SR_ERR;
        ctx = sdi->priv;
+
+       if (ctx->submitted_transfers != 0)
+               return SR_ERR;
+
        ctx->session_dev_id = cb_data;
        ctx->num_samples = 0;
        ctx->empty_transfer_count = 0;