Re: [Bluez PATCH v3] adapter - Device needs to be in the temporary state after pairing failure

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

 



Hi Yu Liu,

On Mon, Aug 24, 2020 at 11:30 AM Yu Liu <yudiliu@xxxxxxxxxx> wrote:
>
> This caused the device hanging around as a discovered device forever
> even if it is turned off or not in present.
>
> Reviewed-by: sonnysasaka@xxxxxxxxxxxx
> ---
>
> Changes in v3:
> - Fix comment format
> - Don't set temporary for trusted device
>
> Changes in v2:
> - Fix title length and format issue
>
> Changes in v1:
> - Initial change
>
>  src/device.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/device.c b/src/device.c
> index bb8e07e8f..103b5df27 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -6008,6 +6008,14 @@ void device_bonding_complete(struct btd_device *device, uint8_t bdaddr_type,
>
>         if (status) {
>                 device_cancel_authentication(device, TRUE);
> +
> +               /* Put the device back to the temporary state so that it will be
> +                * treated as a newly discovered device.
> +                */
> +               if (!device_is_paired(device, bdaddr_type) &&
> +                               !device_is_trusted(device))
> +                       btd_device_set_temporary(device, true);
> +
>                 device_bonding_failed(device, status);
>                 return;
>         }
> --
> 2.28.0.297.g1956fa8f8d-goog

Applied, thanks.

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