Re: [Bluez-devel] [PATCH] Make BluetoothClient work on all adapters

Bastien Nocera
2007-07-24T22:10:51Z

On Tue, 2007-07-24 at 23:14 +0200, Marcel Holtmann wrote:
> Hi Bastien,
>
> > With this patch, we can now pass a NULL as the adapter to work with all
> > the adapters. This is for use in the upcoming patch for the selector
> > widget.
>
> I don't like it. We should not wildly use all attached adapters. Passing
> a NULL to the client creation should use the default adapter.
>
> Actually in case of multiple adapters we need to provide one extra step
> to let the user select the appropriate adapter.
>
> Main reason, why I don't wanna start an inquiry on all adapters is that
> it can happen that you see a remote device with one adapter, but then
> the actual connection or device discovery is done via another one. That
> is not good. We should always use the default adapter and if (and only
> if) more adapters are present, then present a way to select a different
> adapter.
>
> However this includes that we have to monitor if the default adapter
> changes or one adapter gets removed while being in the adapter selector
> widget or device selector widget.

Fair enough, I knew this would be a sticky point. I'm trying to fix it
up so that we use the default adapter by default with "NULL" passed as
the adapter.