Re: [PATCH BlueZ 1/4] core/device: Fix btd_device_set_temporary

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

 



Hi,

On Tue, Mar 17, 2015 at 11:13 AM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
>
> In case the device is set as not temporary it should trigger
> store_device_info but the function checks if temporary flag is set but
> since currently the code only set the flag after the call nothing really
> happens.
> ---
>  src/device.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/src/device.c b/src/device.c
> index 97c0523..6100341 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -4474,17 +4474,19 @@ void btd_device_set_temporary(struct btd_device *device, gboolean temporary)
>
>         DBG("temporary %d", temporary);
>
> +       device->temporary = temporary;
> +
>         if (temporary) {
>                 if (device->bredr)
>                         adapter_whitelist_remove(device->adapter, device);
>                 adapter_connect_list_remove(device->adapter, device);
> -       } else {
> -               if (device->bredr)
> -                       adapter_whitelist_add(device->adapter, device);
> -               store_device_info(device);
> +               return;
>         }
>
> -       device->temporary = temporary;
> +       if (device->bredr)
> +               adapter_whitelist_add(device->adapter, device);
> +
> +       store_device_info(device);
>  }
>
>  void btd_device_set_trusted(struct btd_device *device, gboolean trusted)
> --
> 2.1.0

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