Re: [PATCH BlueZ 2/2] core: Fix creating device from "primary" file

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

 



Hi,

On Fri, May 18, 2012, Paulo Alcantara wrote:
> This patch removes the hard-coded address type for the BLE device
> created from the storage.
> ---
>  src/adapter.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/src/adapter.c b/src/adapter.c
> index dafe595..8d86ca8 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -1940,13 +1940,17 @@ static void create_stored_device_from_primary(char *key, char *value,
>  	struct btd_adapter *adapter = user_data;
>  	struct btd_device *device;
>  	GSList *services, *uuids, *l;
> +	char address[18];
> +	uint8_t bdaddr_type;
> +
> +	if (sscanf(key, "%17s#%hhu", address, &bdaddr_type) != 2)
> +		return;

What about entries created by older bluetoothd versions? Will they be
stuck in the storage forever without a way to remove them through the
usual API? Instead of checking for != 2 maybe the check should instead
be < 1 and bdaddr_type be pre-initialized to BDADDR_LE_PUBLIC.

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