On Wed, Aug 13, 2014 at 04:33:38PM +0200, Soeren Apel wrote:
> Previous runs of dev_acquisition_start() keep the enabled_channels list
> populated if they fail.
> This means that once an invalid channel configuration was detected, it will
> be detected again even if the channel configuration was changed.
> With this change, the list will be cleared before being populated so that any
> stale entries are removed.
>
> ---
> src/hardware/hameg-hmo/api.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c
> index c3d7005..7f3d5f5 100644
> --- a/src/hardware/hameg-hmo/api.c
> +++ b/src/hardware/hameg-hmo/api.c
> @@ -727,6 +727,9 @@ static int dev_acquisition_start(const struct sr_dev_inst
> *sdi, void *cb_data)
> devc = sdi->priv;
> digital_added = FALSE;
>
> + g_slist_free(devc->enabled_channels);
> + devc->enabled_channels = NULL;
> +
> for (l = sdi->channels; l; l = l->next) {
> ch = l->data;
> if (!ch->enabled)
> --
> 1.7.8.6
>
ACK.
Please try to keep the lines of the commit message somewhat shorter in
the future. There is a 50/72 rule, but I don't think anyone follows it that
strictly. Useful link [1].
Thanks, Damir.
[1] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
------------------------------------------------------------------------------
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel