Re: [PATCH BlueZ] core/device: Don't even attempt to load name if address is private

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

 



Hi,

On Thu, Jun 23, 2016 at 2:40 PM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
>
> Device with private address does not have their name stored so it makes
> not sense to attempt to load their names.
> ---
>  src/device.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/device.c b/src/device.c
> index 83a794e..5506bc9 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -2655,6 +2655,9 @@ static char *load_cached_name(struct btd_device *device, const char *local,
>         char *str = NULL;
>         int len;
>
> +       if (device_address_is_private(device))
> +               return NULL;
> +
>         snprintf(filename, PATH_MAX, STORAGEDIR "/%s/cache/%s", local, peer);
>
>         key_file = g_key_file_new();
> --
> 2.5.5

Applied.



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