Re: [PATCH BlueZ 1/1] Refactor btd_device_is_connected

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

 



Hi Dimitris,

On Thu, Apr 4, 2024 at 11:52 AM Dimitris <dimitris.on.linux@xxxxxxxxx> wrote:
>
> On 4/4/24 07:59, Luiz Augusto von Dentz wrote:
>
> >> diff --git a/src/adapter.c b/src/adapter.c
> >> index 4bcc464de..0b7aab4b5 100644
> >> --- a/src/adapter.c
> >> +++ b/src/adapter.c
> >> @@ -7486,7 +7486,7 @@ static void adapter_remove_connection(struct btd_adapter *adapter,
> >>                  device_cancel_authentication(device, TRUE);
> >>
> >>          /* If another bearer is still connected */
> >> -       if (btd_device_is_connected(device))
> >> +       if (btd_device_state_is_connected(device))
> >
> > Perhaps btd_device_bearer_is_connected would be a better name.
>
> Thanks, I'll rename.
>
> > I guess the problem is that some service is indicating it is still
> > connected though?
>
> Newbie question for sure, but: As this is happening in the code path for
> "disabling bluetooth", shouldn't services already be disconnected here?

That is exactly what I would like to know, why is there a service
still indicating it is connected if the controller is rfkilled, so
while this should break it back to the old behavior we still need to
fix the service that is causing the problem so perhaps we need to
print its profile/drive name and figure out what is the driver that is
causing it.

> D.



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