From: Jo?o Paulo Rechi Vita <jprvita@xxxxxxxxxxxxx> --- src/modules/bluetooth/bluetooth-util.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c index 7ae12fc..fb202c1 100644 --- a/src/modules/bluetooth/bluetooth-util.c +++ b/src/modules/bluetooth/bluetooth-util.c @@ -1325,7 +1325,18 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us } } + if (pa_streq(name, "org.ofono")) { + if (old_owner && *old_owner) { + pa_log_debug("oFono disappeared"); + } + + if (new_owner && *new_owner) { + pa_log_debug("oFono appeared"); + } + } + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + } else if (dbus_message_is_signal(m, "org.bluez.MediaTransport", "PropertyChanged")) { pa_bluetooth_transport *t; DBusMessageIter arg_i; @@ -2169,6 +2180,8 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) { ",arg0='org.bluez.Device1'", "type='signal',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'" ",arg0='org.bluez.MediaTransport1'", + "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'," + "arg0='org.ofono'", NULL) < 0) { pa_log("Failed to add D-Bus matches: %s", err.message); goto fail; @@ -2244,6 +2257,8 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) { "type='signal',sender='org.bluez',interface='org.bluez.MediaTransport',member='PropertyChanged'", "type='signal',sender='org.bluez',interface='org.freedesktop.DBus.ObjectManager',member='InterfacesAdded'", "type='signal',sender='org.bluez',interface='org.freedesktop.DBus.ObjectManager',member='InterfacesRemoved'", + "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'," + "arg0='org.ofono'", NULL); if (y->filter_added) -- 1.7.11.7