From cf639b0639491bcf13dde50baa853a2e8f39f512 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Fri, 20 Jun 2014 16:33:34 +0200 Subject: [PATCH] android/bluetooth: Fix loading device address type from storage Address type is stored as "AddressType" key. Also this is valid only for LE capable devices. --- android/bluetooth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/bluetooth.c b/android/bluetooth.c index 7eaa12a83..fc5d529c9 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -2637,8 +2637,6 @@ static struct mgmt_link_key_info *get_key_info(GKeyFile *key_file, str2ba(peer, &info->addr.bdaddr); - info->addr.type = g_key_file_get_integer(key_file, peer, "Type", NULL); - for (i = 0; i < sizeof(info->val); i++) sscanf(str + (i * 2), "%02hhX", &info->val[i]); @@ -2675,7 +2673,8 @@ static struct mgmt_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer, str2ba(peer, &info->addr.bdaddr); - info->addr.type = g_key_file_get_integer(key_file, peer, "Type", NULL); + info->addr.type = g_key_file_get_integer(key_file, peer, "AddressType", + NULL); for (i = 0; i < sizeof(info->val); i++) sscanf(key + (i * 2), "%02hhX", &info->val[i]); @@ -2714,7 +2713,8 @@ static struct mgmt_irk_info *get_irk_info(GKeyFile *key_file, const char *peer) str2ba(peer, &info->addr.bdaddr); - info->addr.type = g_key_file_get_integer(key_file, peer, "Type", NULL); + info->addr.type = g_key_file_get_integer(key_file, peer, "AddressType", + NULL); for (i = 0; i < sizeof(info->val); i++) sscanf(str + (i * 2), "%02hhX", &info->val[i]); -- 2.47.3