summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 364d46a4..78404a33 100644
--- a/src/device.c
+++ b/src/device.c
@@ -701,6 +701,8 @@ void device_remove(struct btd_device *device, DBusConnection *conn,
{
GSList *list;
struct btd_device_driver *driver;
+ bdaddr_t src;
+ char addr[18];
gchar *path = g_strdup(device->path);
debug("Removing device %s", path);
@@ -719,6 +721,10 @@ void device_remove(struct btd_device *device, DBusConnection *conn,
g_free(driver_data);
}
+ adapter_get_address(device->adapter, &src);
+ ba2str(&device->bdaddr, addr);
+ delete_entry(&src, "trusts", addr);
+
g_dbus_unregister_interface(conn, path, DEVICE_INTERFACE);
g_free(path);