[pulseaudio-discuss] [PATCHv2 23/60] bluetooth: Track org.bluez for BlueZ 5
João Paulo Rechi Vita
jprvita at gmail.com
Fri Aug 16 08:27:38 PDT 2013
On Fri, Aug 16, 2013 at 11:13 AM, Tanu Kaskinen
<tanu.kaskinen at linux.intel.com> wrote:
> On Tue, 2013-08-13 at 01:54 -0300, jprvita at gmail.com wrote:
>> From: João Paulo Rechi Vita <jprvita at openbossa.org>
>>
>> ---
>> src/modules/bluetooth/bluez5-util.c | 94 +++++++++++++++++++++++++++++++++++++
>> 1 file changed, 94 insertions(+)
>>
>> diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c
>> index 0f23bff..d60f63c 100644
>> --- a/src/modules/bluetooth/bluez5-util.c
>> +++ b/src/modules/bluetooth/bluez5-util.c
>> @@ -69,6 +151,18 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) {
>> if (PA_REFCNT_DEC(y) > 0)
>> return;
>>
>> + if (y->connection) {
>> + pa_dbus_remove_matches(pa_dbus_connection_get(y->connection),
>> + "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'"
>> + ",arg0='" BLUEZ_SERVICE "'",
>> + NULL);
>
> The match rules should only be removed if they have been added, so you
> need to keep track of that. There can be multiple instances of the same
> match rule, so if bluez5-util removes a match rule that it hasn't added,
> it may remove someone else's match rule (a real example is bluez4-util,
> because it tracks org.bluez name owner too).
>
Makes sense. I'm working on that and I'll send a v3 series with this
and the following patches on this series, because this change will
impact on several of the next patches.
--
João Paulo Rechi Vita
http://about.me/jprvita
More information about the pulseaudio-discuss
mailing list