Re: [PATCH BlueZ] advertising: Fix advertising flags

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

 



Hi,

On Tue, May 26, 2020 at 12:33 PM Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
>
> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
>
> When an instance wants to force being discoverable the code shall
> actually check if the adapter is in general disverable mode already and
> if not set BR/EDR as not supported so that devices scanning don't
> assume BR/EDR PHY is connectable when in fact it isn't.
> ---
>  src/advertising.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/advertising.c b/src/advertising.c
> index 45ff19fa0..829c481f6 100644
> --- a/src/advertising.c
> +++ b/src/advertising.c
> @@ -697,9 +697,12 @@ static bool parse_discoverable(DBusMessageIter *iter,
>
>         dbus_message_iter_get_basic(iter, &discoverable);
>
> -       if (discoverable)
> -               flags = 0x02;
> -       else
> +       if (discoverable) {
> +               /* Set BR/EDR Not Supported if adapter is no discoverable */
> +               if (!btd_adapter_get_discoverable(client->manager->adapter))
> +                       flags = 0x04;
> +               flags |= 0x02;
> +       } else
>                 flags = 0x00;
>
>         if (!set_flags(client , flags))
> --
> 2.25.3

Pushed.

-- 
Luiz Augusto von Dentz



[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