microbit: Populate 'bonds' field in whitelist entry
Update to populate a recently introduced 'bonds' field in the whitelist_t structure. This field records the number of IRKs present in the table, which correlates to the number of bonds.
This commit is contained in:
parent
06a34dad44
commit
2541e8fdb0
|
@ -74,9 +74,12 @@ public:
|
||||||
ble_error_t error = createWhitelistFromBondTable(whitelistFromBondTable);
|
ble_error_t error = createWhitelistFromBondTable(whitelistFromBondTable);
|
||||||
if (error != BLE_ERROR_NONE) {
|
if (error != BLE_ERROR_NONE) {
|
||||||
addresses.size = 0;
|
addresses.size = 0;
|
||||||
|
addresses.bonds = 0;
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addresses.bonds = whitelistFromBondTable.irk_count;
|
||||||
|
|
||||||
/* Put all the addresses in the structure */
|
/* Put all the addresses in the structure */
|
||||||
for (i = 0; i < whitelistFromBondTable.addr_count; ++i) {
|
for (i = 0; i < whitelistFromBondTable.addr_count; ++i) {
|
||||||
if (i >= addresses.capacity) {
|
if (i >= addresses.capacity) {
|
||||||
|
|
Loading…
Reference in New Issue