]> sigrok.org Git - libsigrok.git/commitdiff
Fix #574 by setting up the transfer first, then starting acquisition
authorSoeren Apel <redacted>
Sun, 5 Jul 2015 16:01:45 +0000 (18:01 +0200)
committerUwe Hermann <redacted>
Mon, 6 Jul 2015 10:16:10 +0000 (12:16 +0200)
src/hardware/fx2lafw/api.c

index da560d86e0702935e3a16fdbbb8ed47263c39bea..ada4fcc9b002989572ce5005366fad7636cc35f5 100644 (file)
@@ -780,9 +780,11 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
                dslogic_trigger_request(sdi);
        }
        else {
-               if ((ret = fx2lafw_command_start_acquisition(sdi)) != SR_OK)
-                       return ret;
                start_transfers(sdi);
+               if ((ret = fx2lafw_command_start_acquisition(sdi)) != SR_OK) {
+                       fx2lafw_abort_acquisition(devc);
+                       return ret;
+               }
        }
 
        return SR_OK;