From 58c15493922277539cca11e8b55776c5d0fbccba Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 13 Jan 2009 19:36:56 +0200 Subject: Don't remove linkkeys upon adapter removal --- src/device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/device.c') diff --git a/src/device.c b/src/device.c index b920d5a2..02077f94 100644 --- a/src/device.c +++ b/src/device.c @@ -694,7 +694,8 @@ static void device_remove_bonding(struct btd_device *device, DBusConnection *con "Paired", DBUS_TYPE_BOOLEAN, &paired); } -void device_remove(struct btd_device *device, DBusConnection *conn) +void device_remove(struct btd_device *device, DBusConnection *conn, + gboolean remove_bonding) { GSList *list; struct btd_device_driver *driver; @@ -705,7 +706,7 @@ void device_remove(struct btd_device *device, DBusConnection *conn) if (device->bonding) device_cancel_bonding(device, HCI_OE_USER_ENDED_CONNECTION); - if (!device->temporary) + if (!device->temporary && remove_bonding) device_remove_bonding(device, conn); for (list = device->drivers; list; list = list->next) { -- cgit