Re: [PATCH BlueZ v5 3/7] adapter: Do not filter out broadcast advertiser

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

 



Hi Claudia,

On Tue, Aug 8, 2023 at 9:45 AM Claudia Draghicescu <claudia.rosu@xxxxxxx> wrote:
>
> This allows a broadcast advertiser to be passed up to application,
> if the adapter has the capability of being a Synchronized Receiver.

We probably need a proper method to check if there is any profile with
probe_on_discover that matches the advertising before we allow every
broadcaster to be added as a new device.

> ---
>  src/adapter.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 491bd7031..fa15030e0 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -7029,6 +7029,13 @@ static bool is_filter_match(GSList *discovery_filter, struct eir_data *eir_data,
>         return got_match;
>  }
>
> +static bool accept_bcast_adv(struct btd_adapter *adapter)
> +{
> +       if ((btd_adapter_has_settings(adapter, MGMT_SETTING_ISO_SYNC_RECEIVER)))
> +               return true;
> +
> +       return false;
> +}
>  static void filter_duplicate_data(void *data, void *user_data)
>  {
>         struct discovery_client *client = data;
> @@ -7152,6 +7159,9 @@ void btd_adapter_device_found(struct btd_adapter *adapter,
>                         return;
>                 }
>
> +               if (accept_bcast_adv(adapter))
> +                       monitoring = true;
> +
>                 if (!discoverable && !monitoring && !eir_data.rsi) {
>                         eir_data_free(&eir_data);
>                         return;
> --
> 2.34.1
>


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