rymanluk 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_r349122537
 
 

 ##########
 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:
   @prasad-alatkar Ah ok, I missed `ble_store_util_delete_peer` which is called 
after `ble_hs_pvcy_remove_entry` and of course  it would fail for devices which 
does not use privacy. 
   
   In such a case I would ignore `rc` from `ble_hs_pvcy_remove_entry` at all.
   
   

----------------------------------------------------------------
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

Reply via email to