|
|
759f8b1 |
From 9fd82c196432f3b5aadd0970a810fc778804bb34 Mon Sep 17 00:00:00 2001
|
|
|
759f8b1 |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
759f8b1 |
Date: Mon, 13 Oct 2008 19:52:02 +0200
|
|
|
759f8b1 |
Subject: [PATCH] properly remove dbus matches an filters when unloading m-b-d
|
|
|
759f8b1 |
|
|
|
759f8b1 |
---
|
|
|
759f8b1 |
src/modules/bluetooth/module-bluetooth-discover.c | 17 ++++++++++++++++-
|
|
|
759f8b1 |
1 files changed, 16 insertions(+), 1 deletions(-)
|
|
|
759f8b1 |
|
|
|
759f8b1 |
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
|
|
|
759f8b1 |
index a33ca64..ad436f3 100644
|
|
|
759f8b1 |
--- a/src/modules/bluetooth/module-bluetooth-discover.c
|
|
|
759f8b1 |
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
|
|
|
759f8b1 |
@@ -485,8 +485,23 @@ void pa__done(pa_module* m) {
|
|
|
759f8b1 |
device_free(i);
|
|
|
759f8b1 |
}
|
|
|
759f8b1 |
|
|
|
759f8b1 |
- if (u->conn)
|
|
|
759f8b1 |
+ if (u->conn) {
|
|
|
759f8b1 |
+ DBusError error;
|
|
|
759f8b1 |
+ dbus_error_init(&error);
|
|
|
759f8b1 |
+
|
|
|
759f8b1 |
+ dbus_bus_remove_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.Adapter',member='DeviceRemoved'", &error);
|
|
|
759f8b1 |
+ dbus_error_free(&error);
|
|
|
759f8b1 |
+
|
|
|
759f8b1 |
+ dbus_bus_remove_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.Headset',member='PropertyChanged'", &error);
|
|
|
759f8b1 |
+ dbus_error_free(&error);
|
|
|
759f8b1 |
+
|
|
|
759f8b1 |
+ dbus_bus_remove_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.AudioSink',member='PropertyChanged'", &error);
|
|
|
759f8b1 |
+ dbus_error_free(&error);
|
|
|
759f8b1 |
+
|
|
|
759f8b1 |
+ dbus_connection_remove_filter(pa_dbus_connection_get(u->conn), filter_cb, u);
|
|
|
759f8b1 |
+
|
|
|
759f8b1 |
pa_dbus_connection_unref(u->conn);
|
|
|
759f8b1 |
+ }
|
|
|
759f8b1 |
|
|
|
759f8b1 |
pa_xfree(u);
|
|
|
759f8b1 |
}
|
|
|
759f8b1 |
--
|
|
|
759f8b1 |
1.6.0.3
|
|
|
759f8b1 |
|