summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-hci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-hci.c')
-rw-r--r--hcid/dbus-hci.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index d6fc0e95..20854087 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -494,14 +494,22 @@ int unregister_adapter_path(const char *path)
g_free(adapter);
unreg:
- if (!g_dbus_unregister_all_interfaces(connection, path)) {
- error("D-Bus failed to unregister %s object", path);
+ if (!adapter_cleanup(connection, path)) {
+ error("Failed to unregister adapter interface on %s object",
+ path);
+ return -1;
+ }
+
+ if (!security_cleanup(connection, path)) {
+ error("Failed to unregister security interface on %s object",
+ path);
return -1;
}
if (hcid_dbus_use_experimental()) {
const char *ptr = path + ADAPTER_PATH_INDEX;
- g_dbus_unregister_all_interfaces(connection, ptr);
+
+ adapter_cleanup(connection, ptr);
}
return 0;