From 0d51353f26b7e1953ce5b0dfb69f47f2220c8819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Narajowski?= Date: Thu, 7 Mar 2019 10:53:13 +0100 Subject: [PATCH] apps/bttester: Fix gap pair implementation ble_gap_security_initiate handles these cases under the hood and more. --- apps/bttester/src/gap.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/apps/bttester/src/gap.c b/apps/bttester/src/gap.c index 65986acde..d05441c53 100644 --- a/apps/bttester/src/gap.c +++ b/apps/bttester/src/gap.c @@ -1068,16 +1068,9 @@ static void pair(const u8_t *data, u16_t len) goto rsp; } - if (desc.role == BLE_GAP_ROLE_SLAVE) { - if (ble_sm_slave_initiate(desc.conn_handle)) { - status = BTP_STATUS_FAILED; - goto rsp; - } - } else { - if (ble_sm_pair_initiate(desc.conn_handle)) { - status = BTP_STATUS_FAILED; - goto rsp; - } + if (ble_gap_security_initiate(desc.conn_handle)) { + status = BTP_STATUS_FAILED; + goto rsp; } status = BTP_STATUS_SUCCESS;