Re: [PATCH] client.c cleanup

Marcel Holtmann <[email protected]>
Newsgroups gmane.linux.bluez.devel
Message-ID <1201626119.6218.15.camel@violet>
Hi Bastien,

> Some time ago I had problems with client.c's architecture. It would
> allow me to easily report completed discoveries without causing crashes.
> 
> The attached patch moves all the static variables into the main
> BluetoothClient object, and instead of return a new object when using
> _new() we return an existing instance of the client.
> 
> This makes no changes to the external API for the BluetoothClient, and
> should work just as well as older versions did.

patch has been applied. Don't really see the difference, but I am okay
with doing it this way.

> A couple of bugs I found in client.c:
> - launch test-client with a dongle inserted, remove and reinsert the
> dongle, the bdaddr of the device is not set anymore
> - launch test-client without a dongle inserted, insert it, the bdaddr is
> not set and there's no children to the adapter (although there are if
> inserted when started)
> - launch test-client with a dongle inserted, remove it, add another one,
> the set of known devices underneath hasn't changed
> 
> All those problems exist in the old version of client.c, and I intend on
> fixing them, as well as making the search button work as expected in the
> device selection widget.

Send patches when you figured it out :)

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.