On Fri, Aug 16, 2013 at 11:13 AM, Tanu Kaskinen <[email protected]> wrote: > On Tue, 2013-08-13 at 01:54 -0300, [email protected] wrote: >> From: João Paulo Rechi Vita <[email protected]> >> >> --- >> 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 _______________________________________________ pulseaudio-discuss mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
