From 8e3e061becea8ec6947d151f8974a814fc967a61 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Sun, 7 Feb 2016 19:59:56 +0000 Subject: [PATCH] microbit: BUGFIX Fixed incorrect bond table entry count The nordic implementation of the mbed whitelist API introduces entries into the table that are not bonds. This patch corrects an assumption in microbit-dal that the number of entries in the bond table table corellates with the number of bonds. --- source/ble-services/MicroBitBLEManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ble-services/MicroBitBLEManager.cpp b/source/ble-services/MicroBitBLEManager.cpp index 77f9e7c..757a47d 100644 --- a/source/ble-services/MicroBitBLEManager.cpp +++ b/source/ble-services/MicroBitBLEManager.cpp @@ -330,7 +330,7 @@ int MicroBitBLEManager::getBondCount() whitelist.capacity = MICROBIT_BLE_MAXIMUM_BONDS; ble->securityManager().getAddressesFromBondTable(whitelist); - return whitelist.size; + return whitelist.bonds; } /**