Skip to contentSkip to conversation

Fix not unmarking temporary flag when a new key is created

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages Aug 11, 2010 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Fix not unmarking temporary flag when a new key is created

From: Luiz Augusto von Dentz <[email protected]>

Device may have been marked as temporary so when a new key is generated that meets the requirements to be stored it should unmark temporary flag so the device is not removed when disconnected.

---
 src/dbus-hci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
src/dbus-hci.c +1 -2
index 22f378d..8c1e10c 100644
@@ -746,8 +746,7 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
 	else if (!bonding && old_key_type == 0xff)
 		hcid_dbus_bonding_process_complete(local, peer, 0);
 
-	if (temporary)
-		device_set_temporary(device, TRUE);
+	device_set_temporary(device, temporary);
 
 	return 0;
 }
Signature · 1 line
1.7.0.4
#1 lore raw

Hi Luiz,

Quoted 12 lines · Luiz Augusto von Dentz

Device may have been marked as temporary so when a new key is generated that meets the requirements to be stored it should unmark temporary flag so the device is not removed when disconnected.

---
 src/dbus-hci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
src/dbus-hci.c +0 -0
index 22f378d..8c1e10c 100644

src/dbus-hci.c int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer, · line 752

Quoted 9 lines
src/dbus-hci.c +1 -2
@@ -746,8 +746,7 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
 	else if (!bonding && old_key_type == 0xff)
 		hcid_dbus_bonding_process_complete(local, peer, 0);
 
-	if (temporary)
-		device_set_temporary(device, TRUE);
+	device_set_temporary(device, temporary);
 
 	return 0;
 }

Thanks. The patch is now upstream.

Johan