Re: [PATCH v0 1/4] adapter: Replace device authorizing flag

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

 



Hi Mikel,

On Tue, Sep 11, 2012 at 4:55 PM, Mikel Astiz <mikel.astiz.oss@xxxxxxxxx> wrote:
> From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>
>
> Refactor code to drop the device authorizing flag by replacing it with a
> private authorization pointer in btd_adapter. After all, no more than
> one authorization can be ongoing, so the code is easier to follow if
> this is made explicit.
> ---
>  src/adapter.c |   48 ++++++++++++++++++++++++++++++++----------------
>  src/device.c  |   11 -----------
>  src/device.h  |    2 --
>  3 files changed, 32 insertions(+), 29 deletions(-)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 4b675e8..14c5322 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -128,7 +128,8 @@ struct btd_adapter {
>         GSList *found_devices;
>         GSList *oor_devices;            /* out of range device list */
>         struct agent *agent;            /* For the new API */
> -       guint auth_idle_id;             /* Ongoing authorization */
> +       guint auth_idle_id;             /* Ongoing authorization (trusted) */
> +       struct service_auth *auth;      /* Ongoing authorization */

You should probably store the id directly inside struct service_auth
as they depend on each other then when you free auth you also remove
the id if not set to 0.

-- 
Luiz Augusto von Dentz
--
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