Re: [PATCH 6/6] Notify intermediate measurements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Santiago,

On Wed, Nov 9, 2011 at 6:52 AM, Santiago Carot-Nemesio
<sancane@xxxxxxxxx> wrote:
>  static void recv_measurement(struct thermometer *t, struct measurement *msmt)
>  {
> -       GSList *l;
> +       GSList *l, *ll;
>
> -       if (g_strcmp0(msmt->msmnt, "Intermediate") == 0) {
> -               DBG("Notification of intermediate measurement not implemented");
> -               return;
> -       }
> +       if (g_strcmp0(msmt->msmnt, "Intermediate") == 0)
> +               ll = t->iwatchers;
> +       else
> +               ll = t->fwatchers;
>
> -       for (l = t->fwatchers; l; l = l->next)
> +       for (l = ll; l; l = l->next)
>                update_watcher(l->data, msmt);
>  }

What about using g_slist_foreach() above? Also "ll" seems too generic,
what about "wlist".

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux