mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-01 01:13:23 +00:00
sm: refactor sm_pdu_handler
This commit is contained in:
parent
2c052b15cd
commit
6e46ecced6
12
src/ble/sm.c
12
src/ble/sm.c
@ -4382,12 +4382,6 @@ static void sm_pdu_handler(uint8_t packet_type, hci_con_handle_t con_handle, uin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_debug("sm_pdu_handler: state %u, pdu 0x%02x", 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){
|
if (sm_pdu_code == SM_CODE_KEYPRESS_NOTIFICATION){
|
||||||
uint8_t buffer[5];
|
uint8_t buffer[5];
|
||||||
buffer[0] = SM_EVENT_KEYPRESS_NOTIFICATION;
|
buffer[0] = SM_EVENT_KEYPRESS_NOTIFICATION;
|
||||||
@ -4398,6 +4392,12 @@ static void sm_pdu_handler(uint8_t packet_type, hci_con_handle_t con_handle, uin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_debug("sm_pdu_handler: state %u, pdu 0x%02x", sm_conn->sm_engine_state, sm_pdu_code);
|
||||||
|
|
||||||
|
int err;
|
||||||
|
uint8_t max_encryption_key_size;
|
||||||
|
UNUSED(err);
|
||||||
|
|
||||||
switch (sm_conn->sm_engine_state){
|
switch (sm_conn->sm_engine_state){
|
||||||
|
|
||||||
// a sm timeout requires a new physical connection
|
// a sm timeout requires a new physical connection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user