summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-05 16:39:51 -0800
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-05 16:39:51 -0800
commitc132a2c6401352698139515bbb2b3153495f8b4b (patch)
tree94b85c35452f4e9631b99cdd582efe0ab7288843 /src
parent6c4161fad34d0357f15e8c8501d2b7bfc99052ac (diff)
Only remove the temporary flag if we store the link key
Diffstat (limited to 'src')
-rw-r--r--src/dbus-hci.c4
1 files changed, 2 insertions, 2 deletions
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)