From 5ac2b5578141a2f9240ddf9534be9dfd6ec37e4f Mon Sep 17 00:00:00 2001 From: Prasad Alatkar Date: Wed, 16 Jun 2021 19:13:42 +0530 Subject: [PATCH] NimBLE AFR: Fix conn_handle related bug in pairing request --- nimble/host/src/ble_gap.c | 1 + nimble/host/src/ble_sm.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index a87b5e13b..14101871a 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -5762,6 +5762,7 @@ ble_gap_pairing_req_event(const struct ble_gap_pairing_req *req) memset(&event, 0, sizeof event); event.type = BLE_GAP_EVENT_PAIRING_REQUEST; + event.pairing_req.conn_handle = req->conn_handle; event.pairing_req.io_cap = req->io_cap; event.pairing_req.oob_data_flag = req->oob_data_flag; event.pairing_req.authreq = req->authreq; diff --git a/nimble/host/src/ble_sm.c b/nimble/host/src/ble_sm.c index cfdb2e910..e83b372cb 100644 --- a/nimble/host/src/ble_sm.c +++ b/nimble/host/src/ble_sm.c @@ -871,7 +871,6 @@ static int ble_sm_pairing_req(uint16_t conn_handle, struct ble_sm_pair_cmd *req) { struct ble_gap_pairing_req pair_req; - int rc; pair_req.conn_handle = conn_handle; pair_req.io_cap = req->io_cap;