From c132a2c6401352698139515bbb2b3153495f8b4b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 5 Feb 2009 16:39:51 -0800 Subject: Only remove the temporary flag if we store the link key --- src/dbus-hci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dbus-hci.c b/src/dbus-hci.c index 708c61e4..ac44abe1 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -923,6 +923,8 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer, error("write_link_key: %s (%d)", strerror(-err), -err); return err; } + + device_set_temporary(device, FALSE); } /* If this is not the first link key set a flag so a subsequent auth @@ -930,8 +932,6 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer, if (old_key_type != 0xff) device_set_renewed_key(device, TRUE); - device_set_temporary(device, FALSE); - if (!device_is_connected(device)) device_set_secmode3_conn(device, TRUE); else if (!device_is_bonding(device, NULL) && old_key_type == 0xff) -- cgit