prasad-alatkar commented on a change in pull request #636: NimBLE/host:
`ble_gap_unpair` should continue un-pairing after connection termination
URL: https://github.com/apache/mynewt-nimble/pull/636#discussion_r349051377
##########
File path: nimble/host/src/ble_hs_pvcy.c
##########
@@ -63,17 +63,23 @@ int
ble_hs_pvcy_remove_entry(uint8_t addr_type, const uint8_t *addr)
{
struct ble_hci_le_rmv_resolve_list_cp cmd;
+ int rc;
if (addr_type > BLE_ADDR_RANDOM) {
- return BLE_ERR_INV_HCI_CMD_PARMS;
+ addr_type = addr_type % 2;
}
cmd.peer_addr_type = addr_type;
memcpy(cmd.peer_id_addr, addr, BLE_DEV_ADDR_LEN);
- return ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE,
- BLE_HCI_OCF_LE_RMV_RESOLV_LIST),
- &cmd, sizeof(cmd), NULL, 0);
+ rc = ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE,
Review comment:
But it will again block `ble_gap_unpair` to call `
ble_store_util_delete_peer`. I mean, what if the device was not present in the
resolvable list and still we are trying to remove it ? From user's perspective
`ble_gap_unpair` API should complete calling all the 3 APIs till
`ble_store_util_delete_peer`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services