Default missing DevType and DevClass in NVRAM.
Missing DevType and DevClass in NVRAM were not properly set to a
default values previously.
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index a9e4c94..0fb1b91 100644
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c
@@ -871,7 +871,6 @@
uint32_t disc_timeout;
bt_uuid_t local_uuids[BT_MAX_NUM_UUIDS];
bt_uuid_t remote_uuids[BT_MAX_NUM_UUIDS];
- uint32_t cod, devtype;
btif_in_fetch_bonded_devices(&bonded_devices, 1);
@@ -936,6 +935,12 @@
{
bt_bdaddr_t *p_remote_addr;
+ /*
+ * TODO: improve handling of missing fields in NVRAM.
+ */
+ uint32_t cod = 0;
+ uint32_t devtype = 0;
+
num_props = 0;
p_remote_addr = &bonded_devices.devices[i];
memset(remote_properties, 0, sizeof(remote_properties));