sm: avoid emitting pairing complete twice

This commit is contained in:
Matthias Ringwald 2021-05-21 12:15:00 +02:00
parent a536dfcc0c
commit 69f82ad86e

View File

@ -648,6 +648,8 @@ static void sm_pairing_complete(sm_connection_t * sm_conn, uint8_t status, uint8
if (!sm_conn->sm_pairing_active) return;
sm_conn->sm_pairing_active = false;
uint8_t event[13];
sm_setup_event_base(event, sizeof(event), SM_EVENT_PAIRING_COMPLETE, sm_conn->sm_handle, setup->sm_peer_addr_type, setup->sm_peer_address);
event[11] = status;