Re: [PATCH] advertising: Fix setting discoverable flag only for peripheral

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

 



Hi Szymon,

On Tue, Feb 20, 2018 at 5:13 PM, Szymon Janc <szymon.janc@xxxxxxxxxxx> wrote:
> General Discoverable mode can also be set for non-connectable
> advertising. This was affecting GAP/DISC/GENM/BV-03-C qualification
> testcase.
> ---
>  src/advertising.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/src/advertising.c b/src/advertising.c
> index 38d2a2d1f..6e227d4d1 100644
> --- a/src/advertising.c
> +++ b/src/advertising.c
> @@ -622,12 +622,11 @@ static int refresh_adv(struct btd_adv_client *client, mgmt_request_func_t func)
>
>         DBG("Refreshing advertisement: %s", client->path);
>
> -       if (client->type == AD_TYPE_PERIPHERAL) {
> +       if (client->type == AD_TYPE_PERIPHERAL)
>                 flags = MGMT_ADV_FLAG_CONNECTABLE;
>
> -               if (btd_adapter_get_discoverable(client->manager->adapter))
> -                       flags |= MGMT_ADV_FLAG_DISCOV;
> -       }
> +       if (btd_adapter_get_discoverable(client->manager->adapter))
> +               flags |= MGMT_ADV_FLAG_DISCOV;

iirc there were something saying that non-connectable advertisement
should not set these flags, if I recall this right this was why
beacons used to not show on the discovery or something like that.

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