Skip to content

Commit 5853368

Browse files
author
Jamie C. Driver
committed
ble: always call ble_gap_security_initiate() on establishing connection
Reverts 61e32f0 for android issues
1 parent 8dae92c commit 5853368

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

main/ble/ble.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,9 @@ static int ble_gap_event(struct ble_gap_event* event, void* arg)
604604
JADE_ASSERT(rc == 0);
605605
ble_print_conn_desc(&desc);
606606

607-
// enable ble security if not already encrypted
608-
if (!desc.sec_state.encrypted) {
609-
rc = ble_gap_security_initiate(event->connect.conn_handle);
610-
JADE_ASSERT(rc == 0);
611-
}
607+
// enable ble security
608+
rc = ble_gap_security_initiate(event->connect.conn_handle);
609+
JADE_ASSERT(rc == 0);
612610
}
613611

614612
if (event->connect.status != 0) {

0 commit comments

Comments
 (0)