]> code.delx.au - pulseaudio/commit
bluetooth: Hold device pointer while module loaded
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Mon, 22 Oct 2012 08:46:39 +0000 (10:46 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 22 Oct 2012 16:01:42 +0000 (19:01 +0300)
commit0b72a87c26ea3dc3b23176f4ebbc5b4dd789fc59
treee85ed4fb7cf1aa8e6d85631e8f0cb9f1dccac5d0
parentea45f2c7951a81b2f43029892535d6a6280eb97e
bluetooth: Hold device pointer while module loaded

Instead of repeatedly asking the discovery API to find a device given
our device path, let's hold a pointer to the device and make sure we
remove the reference when the hook is fired reporting that the device
has been removed. This makes the code easier to follow and slightly
more efficient.
src/modules/bluetooth/module-bluetooth-device.c