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_r345041041
 
 

 ##########
 File path: nimble/host/src/ble_gap.c
 ##########
 @@ -5192,7 +5192,7 @@ ble_gap_unpair(const ble_addr_t *peer_addr)
     conn = ble_hs_conn_find_by_addr(peer_addr);
     if (conn != NULL) {
         rc = ble_gap_terminate_with_conn(conn, BLE_ERR_REM_USER_CONN_TERM);
-        if ((rc != BLE_HS_EALREADY) && (rc != BLE_HS_ENOTCONN)) {
+        if ((rc != 0) &&  (rc != BLE_HS_EALREADY) && (rc != BLE_HS_ENOTCONN)) {
 
 Review comment:
   Sure @rymanluk I will modify `ble_hs_pvcy_remove_entry` accordingly. I think 
apart from this, there is need to change `ble_gap_unpair` a little, where 
return code `BLE_ERR_UNK_CONN_ID` from `ble_hs_pvcy_remove_entry` should also 
not be considered as error. 

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