On 07/10/2014 04:17 AM, Kumar Abhishek wrote:

> diff --git a/hardware/beaglelogic/protocol.c b/hardware/beaglelogic/protocol.c
[...]
>  SR_PRIV int beaglelogic_receive_data(int fd, int revents, void *cb_data)
[...]
> +             /* Update byte count and offset (roll over if needed) */
> +             devc->bytes_read += logic.length;
> +             if ((devc->offset += copysize) >= devc->buffersize) {

Both devc->bytes_read and devc->offset are never initialized properly. This
works for you now because you're using sigrok-cli to test, which runs once
and then exits -- and all of devc is set to 0 via g_malloc0().

But on a client like PulseView, which does multiple acquisitions on the same
device without rescanning, this will fail hard.

All device context variables which are used in callbacks during acquisition
must be reset in dev_acquisition_start().


-- 
Bert Vermeulen        [email protected]          email/xmpp

------------------------------------------------------------------------------
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to