Re: [PATCH 1/6] core: Convert the pincode callback to an interable list.

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

 



Hi Alex,

> The current pincode callback list on the adapter keeps track of all the
> pincode callbacks registered by a plugin for that adapter and calls each
> one until one provides a pincode for the current bonding. This mechanism
> forgets about what happened with previous bonding attempts and pushes the
> status track to the plugin side.
> 
> This patch creates an iterator struct (struct pincb_iter) that keeps track
> of the last function called and the number of times called. This will
> allow to provide more information about the bonding status to the pincode
> callback.
> ---
> src/adapter.c | 51 +++++++++++++++++++++++++++++++++++++++++++--------
> src/adapter.h |  4 ++++
> src/device.c  | 13 +++++++++++++
> src/device.h  |  1 +
> 4 files changed, 61 insertions(+), 8 deletions(-)
> 
> diff --git a/src/adapter.c b/src/adapter.c
> index 6255da6..957f829 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -121,6 +121,12 @@ struct service_auth {
> 	struct agent *agent;		/* NULL for queued auths */
> };
> 
> +struct pincb_iter {
> +	GSList *it;			/* current callback function */
> +	int count;			/* numer of times it() was called */
> +	/* When the iterator reaches the end, it is NULL and count is -1 */
> +};
> +

explain to me why this iter struct is needed. I am a little bit lost on the nested GSList in it.

I get the basic idea what this patch tries to achieve, but it looks a bit too complicated to me.

Regards

Marcel

--
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