Lars-Peter Clausen wrote:
> +++ b/libsigrok/hardware/fx2lafw/fx2lafw.c
> @@ -662,7 +662,14 @@ static int receive_data(int fd, int revents, void
> *cb_data)
>
> static void abort_acquisition(struct context *ctx)
> {
> + unsigned int i;
> +
> ctx->num_samples = -1;
> +
> + for (i = 0; i < ctx->num_transfers; i++) {
> + if (ctx->transfers[i])
> + libusb_cancel_transfer(ctx->transfers[i]);
> + }
> }
I'd recommend to free in reverse order, to avoid that transfer 0 is
cancelled but meanwhile the host controller starts transfer 1, and
so on.
//Peter
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel