Skip to content

Commit

Permalink
sm: refactor sm_pdu_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mringwal committed Apr 17, 2024
1 parent 2c052b1 commit 6e46ecc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/ble/sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4382,12 4382,6 @@ static void sm_pdu_handler(uint8_t packet_type, hci_con_handle_t con_handle, uin
return;
}

log_debug("sm_pdu_handler: state %u, pdu 0xx", sm_conn->sm_engine_state, sm_pdu_code);

int err;
uint8_t max_encryption_key_size;
UNUSED(err);

if (sm_pdu_code == SM_CODE_KEYPRESS_NOTIFICATION){
uint8_t buffer[5];
buffer[0] = SM_EVENT_KEYPRESS_NOTIFICATION;
Expand All @@ -4397,7 4391,13 @@ static void sm_pdu_handler(uint8_t packet_type, hci_con_handle_t con_handle, uin
sm_dispatch_event(HCI_EVENT_PACKET, 0, buffer, sizeof(buffer));
return;
}


log_debug("sm_pdu_handler: state %u, pdu 0xx", sm_conn->sm_engine_state, sm_pdu_code);

int err;
uint8_t max_encryption_key_size;
UNUSED(err);

switch (sm_conn->sm_engine_state){

// a sm timeout requires a new physical connection
Expand Down

0 comments on commit 6e46ecc

Please sign in to comment.