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 2021/11/19 15:22:04 UTC

[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1025: Add pairing complete ev

KKopyscinski commented on a change in pull request #1025:
URL: https://github.com/apache/mynewt-nimble/pull/1025#discussion_r753285787



##########
File path: nimble/host/src/ble_sm.c
##########
@@ -933,6 +933,12 @@ ble_sm_process_result(uint16_t conn_handle, struct ble_sm_result *res)
 
         ble_hs_unlock();
 
+        if (res->enc_cb &&
+            res->app_status != BLE_HS_ENOTCONN) {
+            /* Do not send this event on broken connection */
+            ble_gap_pairing_complete_event(conn_handle, res->sm_err);

Review comment:
       I think we should send in event `res->sm_err` which is either BLE_SM_ERR_SUCCESS (if set by `ble_sm_key_exch_success`) or error code (if set by `ble_sm_key_exch_success`), but maybe I don't see something?




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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org