You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/11/12 06:58:00 UTC

[GitHub] [mynewt-nimble] prasad-alatkar commented on a change in pull request #636: NimBLE/host: `ble_gap_unpair` should continue un-pairing after connection termination

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:
users@infra.apache.org


With regards,
Apache Git Services