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

Marcel Holtmann
2007-07-25T07:04:28Z

Hi Bastien,

> > > 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.
>
> Here goes. This should correctly kill the disco on the old default
> adapter and re-enable it on the new default adapter, when the default
> adapter changes.

you patch is wrong. You are messing up a DBusConnection object with the
BluetoothClient object in the callbacks of the DefaultAdapterChanged
signal.

Actually I also don't like this way, we should store the default path
globally since that is what really counts. The tree storing all
information should be fully valid as long as we have an instance of the
BluetoothClient object and it can store the information about the
default adapter for us.