summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-10-13 19:52:02 +0200
committerLennart Poettering <lennart@poettering.net>2008-10-23 22:58:19 +0200
commit9fd82c196432f3b5aadd0970a810fc778804bb34 (patch)
tree489a57ba541b45d5ea7a97f8898ba4eb383abe25 /src
parentcab7cc3dfdbcc7dbe55862a3b39d9c6950a93c12 (diff)
properly remove dbus matches an filters when unloading m-b-d
Diffstat (limited to 'src')
-rw-r--r--src/modules/bluetooth/module-bluetooth-discover.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
index a33ca648..ad436f34 100644
--- a/src/modules/bluetooth/module-bluetooth-discover.c
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -485,8 +485,23 @@ void pa__done(pa_module* m) {
device_free(i);
}
- if (u->conn)
+ if (u->conn) {
+ DBusError error;
+ dbus_error_init(&error);
+
+ dbus_bus_remove_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.Adapter',member='DeviceRemoved'", &error);
+ dbus_error_free(&error);
+
+ dbus_bus_remove_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.Headset',member='PropertyChanged'", &error);
+ dbus_error_free(&error);
+
+ dbus_bus_remove_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.AudioSink',member='PropertyChanged'", &error);
+ dbus_error_free(&error);
+
+ dbus_connection_remove_filter(pa_dbus_connection_get(u->conn), filter_cb, u);
+
pa_dbus_connection_unref(u->conn);
+ }
pa_xfree(u);
}