diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-06 10:26:47 -0800 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-06 10:26:47 -0800 |
commit | 67d8c4fbc43e4e72174da96734572c3c2291bc4b (patch) | |
tree | 50fc8188ea253d44ea0d58fa5c05409a85f0ec11 /src | |
parent | 265a35022db9d93602fc5bce42d796911c4f58cd (diff) |
Remember to remove trust upon device removal
Diffstat (limited to 'src')
-rw-r--r-- | src/device.c | 6 |
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); |