diff options
author | Ganesh Ganapathi Batta <ganeshg@broadcom.com> | 2012-05-21 12:03:45 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:21 -0700 |
commit | f3bd1ffe42de3e86df4531cd853dcc4b9bfe669d (patch) | |
tree | 2e10f1f593ccecf8ac6c4db9e811ff44277dd68f | |
parent | 2672151d36df40cd06b4fbed26d1ee8c7e85c72f (diff) | |
download | external_bluetooth_bluedroid-f3bd1ffe42de3e86df4531cd853dcc4b9bfe669d.zip external_bluetooth_bluedroid-f3bd1ffe42de3e86df4531cd853dcc4b9bfe669d.tar.gz external_bluetooth_bluedroid-f3bd1ffe42de3e86df4531cd853dcc4b9bfe669d.tar.bz2 |
Convert BDA str to uppercase before comparing with autopair blacklist
Change-Id: I6088f79f818cee347811cd8f883daf8e8ef92eeb
-rwxr-xr-x | btif/src/btif_storage.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c index a68f76e..2ff415c 100755 --- a/btif/src/btif_storage.c +++ b/btif/src/btif_storage.c @@ -99,6 +99,8 @@ #include <stdlib.h> #include <time.h> #include <string.h> +#include <ctype.h> + #include <hardware/bluetooth.h> @@ -141,7 +143,6 @@ #define BTIF_STORAGE_KEY_AUTOPAIR_BLIACKLIST_EXACTNAME "ExactNameBlacklist" #define BTIF_STORAGE_KEY_AUTOPAIR_BLIACKLIST_PARTIALNAME "PartialNameBlacklist" #define BTIF_STORAGE_KEY_AUTOPAIR_FIXPIN_KBLIST "FixedPinZerosKeyboardBlacklist" -#define BTIF_STORAGE_KEY_AUTOPAIR_FIXPIN_KBLIST "FixedPinZerosKeyboardBlacklist" #define BTIF_STORAGE_KEY_AUTOPAIR_DYNAMIC_BLIACKLIST_ADDR "DynamicAddressBlacklist" #define BTIF_AUTO_PAIR_CONF_VALUE_SEPERATOR "," @@ -1805,6 +1806,7 @@ BOOLEAN btif_storage_is_device_autopair_blacklisted(bt_bdaddr_t *remote_dev_add bdstr_t bdstr; char bd_addr_lap[9]; char *dev_name_str; + uint8_t i = 0; char linebuf[BTIF_STORAGE_MAX_LINE_SZ]; bd2str(remote_dev_addr, &bdstr); @@ -1812,6 +1814,10 @@ BOOLEAN btif_storage_is_device_autopair_blacklisted(bt_bdaddr_t *remote_dev_add /* create a string with Lower Address Part from BD Address */ snprintf(bd_addr_lap, 9, "%s", (char*)bdstr); + for ( i =0; i <strlen(bd_addr_lap) ;i++) + { + bd_addr_lap[i] = toupper(bd_addr_lap[i]); + } /* create filepath */ fname = btif_in_make_filename(NULL, BTIF_STORAGE_PATH_AUTOPAIR_BLACKLIST); @@ -1933,11 +1939,17 @@ BOOLEAN btif_storage_is_fixed_pin_zeros_keyboard(bt_bdaddr_t *remote_dev_addr) bdstr_t bdstr; char bd_addr_lap[9]; char *dev_name_str; + uint8_t i = 0; char linebuf[BTIF_STORAGE_MAX_LINE_SZ]; bd2str(remote_dev_addr, &bdstr); snprintf(bd_addr_lap, 9, "%s", (char*)bdstr); + for ( i =0; i <strlen(bd_addr_lap) ;i++) + { + bd_addr_lap[i] = toupper(bd_addr_lap[i]); + } + /* create filepath */ fname = btif_in_make_filename(NULL, BTIF_STORAGE_PATH_AUTOPAIR_BLACKLIST); |